mirror of
http://junepve.top:3000/chicrobot/CINC.git
synced 2026-10-30 07:41:29 +08:00
fix(ASTS) 修复提前收回时定时清楚仍在生效的问题
This commit is contained in:
1 parent
8f4616bbe7
commit
0f6987da2a
1 file changed
+10
-1
@@ -1127,7 +1127,7 @@ export default class AttackSkillTestScene extends Phaser.Scene {
|
|||||||
this.puppet.clearTarget();
|
this.puppet.clearTarget();
|
||||||
|
|
||||||
// 一段时间后自动销毁傀儡,切换到本体控制
|
// 一段时间后自动销毁傀儡,切换到本体控制
|
||||||
this.time.delayedCall(3000, () => {
|
this.puppetDestructionTimer = this.time.delayedCall(3000, () => {
|
||||||
if (this.puppet) {
|
if (this.puppet) {
|
||||||
// 销毁眩晕特效
|
// 销毁眩晕特效
|
||||||
if (this.stunEffect) {
|
if (this.stunEffect) {
|
||||||
@@ -1173,6 +1173,9 @@ export default class AttackSkillTestScene extends Phaser.Scene {
|
|||||||
firstCastTime: 0,
|
firstCastTime: 0,
|
||||||
secondCastTime: 0
|
secondCastTime: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 清除计时器引用
|
||||||
|
this.puppetDestructionTimer = null;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1534,6 +1537,12 @@ export default class AttackSkillTestScene extends Phaser.Scene {
|
|||||||
*/
|
*/
|
||||||
switchToYuange(destroyPuppet = true) {
|
switchToYuange(destroyPuppet = true) {
|
||||||
if (destroyPuppet && this.puppet) {
|
if (destroyPuppet && this.puppet) {
|
||||||
|
// 清除定时销毁任务
|
||||||
|
if (this.puppetDestructionTimer) {
|
||||||
|
this.puppetDestructionTimer.remove();
|
||||||
|
this.puppetDestructionTimer = null;
|
||||||
|
}
|
||||||
|
|
||||||
// 删除傀儡
|
// 删除傀儡
|
||||||
this.puppet.destroy();
|
this.puppet.destroy();
|
||||||
this.puppet = null;
|
this.puppet = null;
|
||||||
|
|||||||
Reference in new issue
Block a user