mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
feat(角色): 调整公鸡角色的攻击速度计算方式
修改公鸡角色的攻击蓄力逻辑,将攻击速度属性(FieldStore.Entity.ATTACK_SPEED)纳入计算,影响粒子效果速度和武器蓄力时间
This commit is contained in:
@@ -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
|
||||
chargeParticle.speed_scale += 0.01 * self.fields.get(FieldStore.Entity.ATTACK_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
|
||||
weapon.chargedTime = chargedTime * self.fields.get(FieldStore.Entity.ATTACK_SPEED)
|
||||
tryAttack(weaponIndex)
|
||||
chargeParticle.emitting = false
|
||||
|
||||
Reference in New Issue
Block a user