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

feat(角色系统): 添加蓄力速度属性并应用于公鸡角色

- 在EntityBase.gd和FieldStore.gd中添加CHARGE_SPEED属性
- 在Rooster.gd中将攻击速度替换为蓄力速度影响粒子效果和武器充能时间
This commit is contained in:
2026-02-11 16:52:54 +08:00
parent 0fe03c1f5d
commit 7d940cf3fc
3 changed files with 9 additions and 5 deletions
+2 -2
View File
@@ -55,7 +55,7 @@ func tryLaunch(action: String, weaponIndex: int):
chargeParticle.speed_scale = 1
if Input.is_action_pressed(action):
if chargeStartTime.has(weaponIndex):
chargeParticle.speed_scale += 0.01 * self.fields.get(FieldStore.Entity.ATTACK_SPEED)
chargeParticle.speed_scale += 0.01 * self.fields.get(FieldStore.Entity.CHARGE_SPEED)
else:
tryAttack(weaponIndex)
if Input.is_action_just_released(action):
@@ -67,6 +67,6 @@ func tryLaunch(action: String, weaponIndex: int):
if len(weapons) > weaponIndex:
var weapon = weapons[weaponIndex]
if weapon.chargable:
weapon.chargedTime = chargedTime * self.fields.get(FieldStore.Entity.ATTACK_SPEED)
weapon.chargedTime = chargedTime * self.fields.get(FieldStore.Entity.CHARGE_SPEED)
tryAttack(weaponIndex)
chargeParticle.emitting = false