mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-03 01:41:53 +08:00
refactor(Bullet): 移除ChickSprint的atk变量并简化伤害计算
调整Cat角色的攻击冷却时间和冲刺倍数 为BulletBase添加speedScale属性和setupCuttable方法 将Volcano的animator速度设置移至ai方法并应用speedScale
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
extends BulletBase
|
||||
class_name ChickSprint
|
||||
|
||||
var atk: float = 1
|
||||
|
||||
func register():
|
||||
speed = 0
|
||||
penerate = 1
|
||||
func ai():
|
||||
baseDamage = launcher.velocity.length() / 500.0 * atk
|
||||
baseDamage = launcher.velocity.length() / 500.0
|
||||
PresetBulletAI.lockLauncher(self, launcher, true)
|
||||
if !launcher.sprinting:
|
||||
tryDestroy()
|
||||
|
||||
@@ -10,8 +10,9 @@ var dmg5: float = 0
|
||||
var splitAngle: float = 10
|
||||
|
||||
func register():
|
||||
animator.speed_scale = launcher.fields.get(FieldStore.Entity.ATTACK_SPEED)
|
||||
setupCuttable(0.1)
|
||||
func ai():
|
||||
animator.speed_scale = launcher.fields.get(FieldStore.Entity.ATTACK_SPEED) * speedScale
|
||||
PresetBulletAI.lockLauncher(self, launcher, true)
|
||||
rotation = lerp_angle(
|
||||
rotation,
|
||||
|
||||
Reference in New Issue
Block a user