1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

fix(Rooster): 修复蓄力攻击粒子效果和初始化问题

调整蓄力攻击时粒子效果的速度缩放比例,并修复初始化时未设置默认值的问题
This commit is contained in:
2026-02-05 21:03:35 +08:00
parent 345c1ad9dd
commit 5edb048eed
2 changed files with 14 additions and 1 deletions
+4 -1
View File
@@ -52,8 +52,11 @@ func tryLaunch(action: String, weaponIndex: int):
if weapon.chargable and weapon.canAttackBy(self):
chargeStartTime[weaponIndex] = Time.get_ticks_msec()
chargeParticle.emitting = true
chargeParticle.speed_scale = 1
if Input.is_action_pressed(action):
if !chargeStartTime.has(weaponIndex):
if chargeStartTime.has(weaponIndex):
chargeParticle.speed_scale += 0.01
else:
tryAttack(weaponIndex)
if Input.is_action_just_released(action):
if chargeStartTime.has(weaponIndex):