コラプス時間を延長したい
Posted: 2023年7月17日(月) 19:26
ボスの消滅エフェクトを変えたくて、rpg_spritesの
if (this._effectType === 'bossCollapse') {の部分をコメントアウトし
Sprite_Enemy.prototype.updateBossCollapse = function(power, speed, duration) {
this._shake = Math.sin(this._effectDuration * 80) * 3;
this.opacity *= this._effectDuration / (this._effectDuration + 1);
this.setBlendColor([255, 0, 0, 255 - this.opacity]);
if (this._effectDuration % 20 === 0) {
SoundManager.playBossCollapse2();
}
};
とjsファイルに組み込んでみました。
ほぼ理想通りのコラプスになったのですが、時間が短く、1秒程度で消滅してしまいます。
これを10秒くらいかけて消滅するようにしたいのですが、どこをいじればいいのでしょうか。
延長したいのはボスの消滅エフェクトだけです。
どなたか詳しい方おられれば、ぜひご教示ください。
よろしくお願い致します。
if (this._effectType === 'bossCollapse') {の部分をコメントアウトし
Sprite_Enemy.prototype.updateBossCollapse = function(power, speed, duration) {
this._shake = Math.sin(this._effectDuration * 80) * 3;
this.opacity *= this._effectDuration / (this._effectDuration + 1);
this.setBlendColor([255, 0, 0, 255 - this.opacity]);
if (this._effectDuration % 20 === 0) {
SoundManager.playBossCollapse2();
}
};
とjsファイルに組み込んでみました。
ほぼ理想通りのコラプスになったのですが、時間が短く、1秒程度で消滅してしまいます。
これを10秒くらいかけて消滅するようにしたいのですが、どこをいじればいいのでしょうか。
延長したいのはボスの消滅エフェクトだけです。
どなたか詳しい方おられれば、ぜひご教示ください。
よろしくお願い致します。