mirror of
http://junepve.top:3000/chicrobot/CINC.git
synced 2026-10-30 03:11:29 +08:00
feat(ASTS) 添加四技能释放特效
This commit is contained in:
1 parent
43a3803b6f
commit
f6f7076fcb
1 file changed
+14
@@ -889,11 +889,25 @@ export default class AttackSkillTestScene extends Phaser.Scene {
|
|||||||
// 短暂停顿(0.5秒)
|
// 短暂停顿(0.5秒)
|
||||||
yuange.setVelocity(0, 0);
|
yuange.setVelocity(0, 0);
|
||||||
|
|
||||||
|
// 创建淡入淡出特效:在等待期间逐渐变淡
|
||||||
|
this.tweens.add({
|
||||||
|
targets: yuange,
|
||||||
|
alpha: 0.3, // 透明度变为30%
|
||||||
|
duration: 450, // 持续450毫秒,比延迟时间略短
|
||||||
|
ease: 'Linear', // 线性变化
|
||||||
|
onComplete: function() {
|
||||||
|
// 特效完成后不做任何操作,等待延迟回调
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 延迟后直接传送,不需要移动过程
|
// 延迟后直接传送,不需要移动过程
|
||||||
this.time.delayedCall(500, () => {
|
this.time.delayedCall(500, () => {
|
||||||
yuange.setPosition(targetX, targetY);
|
yuange.setPosition(targetX, targetY);
|
||||||
yuange.setVelocity(0, 0);
|
yuange.setVelocity(0, 0);
|
||||||
|
|
||||||
|
// 立即恢复透明度
|
||||||
|
yuange.alpha = 1;
|
||||||
|
|
||||||
// 技能释放完成后,恢复移动能力
|
// 技能释放完成后,恢复移动能力
|
||||||
yuange.canMove = true;
|
yuange.canMove = true;
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user