mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
fix(EnergyBlock): 为不同攻击类型添加适当的延迟
在攻击动画结束后添加等待时间,确保动画播放完整后再执行后续动作
This commit is contained in:
@@ -27,6 +27,7 @@ func attack(type: int):
|
|||||||
for bullet in BulletBase.generate(ComponentManager.getBullet("SwingSword"), self , getTrackingAnchor(), getTrackingAnchor().angle_to_point(currentFocusedPosition)):
|
for bullet in BulletBase.generate(ComponentManager.getBullet("SwingSword"), self , getTrackingAnchor(), getTrackingAnchor().angle_to_point(currentFocusedPosition)):
|
||||||
if bullet is SwingSwordBullet:
|
if bullet is SwingSwordBullet:
|
||||||
await bullet.destroied
|
await bullet.destroied
|
||||||
|
await TickTool.millseconds(1000)
|
||||||
elif type == 1:
|
elif type == 1:
|
||||||
for bullet in BulletBase.generate(ComponentManager.getBullet("Broom"), self , getTrackingAnchor(), getTrackingAnchor().angle_to_point(currentFocusedPosition)):
|
for bullet in BulletBase.generate(ComponentManager.getBullet("Broom"), self , getTrackingAnchor(), getTrackingAnchor().angle_to_point(currentFocusedPosition)):
|
||||||
if is_instance_valid(currentBroom): break
|
if is_instance_valid(currentBroom): break
|
||||||
@@ -38,6 +39,7 @@ func attack(type: int):
|
|||||||
await chargeUp()
|
await chargeUp()
|
||||||
trySprint()
|
trySprint()
|
||||||
currentBroom.animator.play("attack")
|
currentBroom.animator.play("attack")
|
||||||
|
await TickTool.millseconds(1000)
|
||||||
elif type == 2:
|
elif type == 2:
|
||||||
for i in 3:
|
for i in 3:
|
||||||
for bullet in BulletBase.generate(ComponentManager.getBullet("BroomGun"), self , position, position.angle_to_point(currentFocusedPosition)):
|
for bullet in BulletBase.generate(ComponentManager.getBullet("BroomGun"), self , position, position.angle_to_point(currentFocusedPosition)):
|
||||||
@@ -51,6 +53,7 @@ func attack(type: int):
|
|||||||
bullet.animator.play("rotate")
|
bullet.animator.play("rotate")
|
||||||
await bullet.destroied
|
await bullet.destroied
|
||||||
fields[FieldStore.Entity.MOVEMENT_SPEED] /= 3
|
fields[FieldStore.Entity.MOVEMENT_SPEED] /= 3
|
||||||
|
await TickTool.millseconds(4000)
|
||||||
elif type == 4:
|
elif type == 4:
|
||||||
BulletBase.generate(ComponentManager.getBullet("BroomBoomerang"), self , position, position.angle_to_point(currentFocusedPosition))
|
BulletBase.generate(ComponentManager.getBullet("BroomBoomerang"), self , position, position.angle_to_point(currentFocusedPosition))
|
||||||
elif type == 5:
|
elif type == 5:
|
||||||
|
|||||||
Reference in New Issue
Block a user