mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 23:11:54 +08:00
46ea2fc775
将子弹的伤害属性从`damage`重命名为`baseDamage`,并引入`damageMultipliers`数组支持多段伤害 为火山武器添加三段攻击音效并调整伤害倍率 更新相关武器和子弹脚本以适配新的伤害系统
23 lines
803 B
GDScript
23 lines
803 B
GDScript
extends BulletBase
|
|
class_name BigLaser
|
|
|
|
var dotTime: float = 100
|
|
|
|
func register():
|
|
speed = 0
|
|
penerate = 1
|
|
func spawn():
|
|
CameraManager.shake(5000, 100) # 激光会运行5秒(5000毫秒),期间震屏超高强度
|
|
CameraManager.playAnimation("bigLaser")
|
|
baseDamage *= launcher.fields[FieldStore.Entity.ATTACK_SPEED]
|
|
func ai():
|
|
rotation = lerp_angle(rotation, ((get_global_mouse_position() - position).angle()), 0.1)
|
|
position = launcher.texture.global_position
|
|
func applyDot():
|
|
hitbox.disabled = true
|
|
await TickTool.millseconds(dotTime / launcher.fields[FieldStore.Entity.ATTACK_SPEED])
|
|
hitbox.disabled = false
|
|
await TickTool.millseconds(dotTime / launcher.fields[FieldStore.Entity.ATTACK_SPEED])
|
|
await TickTool.frame() # 等至少一帧,防止跳帧导致没检测到伤害
|
|
return true
|