mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 23:11:54 +08:00
46ea2fc775
将子弹的伤害属性从`damage`重命名为`baseDamage`,并引入`damageMultipliers`数组支持多段伤害 为火山武器添加三段攻击音效并调整伤害倍率 更新相关武器和子弹脚本以适配新的伤害系统
29 lines
673 B
GDScript
29 lines
673 B
GDScript
extends BulletBase
|
|
class_name Volcano
|
|
|
|
@onready var textureSword: Sprite2D = $%textureSword
|
|
@onready var anchor: Node2D = $%anchor
|
|
|
|
var rotates: float = 0
|
|
|
|
func register():
|
|
animator.speed_scale = launcher.fields.get(FieldStore.Entity.ATTACK_SPEED)
|
|
func ai():
|
|
PresetBulletAI.lockLauncher(self, launcher, true)
|
|
rotation = lerp_angle(
|
|
rotation,
|
|
position.angle_to_point(get_global_mouse_position()),
|
|
rotates
|
|
)
|
|
|
|
func generateShadow():
|
|
for i in BulletBase.generate(
|
|
ComponentManager.getBullet("VolcanoShadow"),
|
|
launcher,
|
|
textureSword.global_position,
|
|
anchor.global_rotation,
|
|
false, false, true, true
|
|
):
|
|
if i is VolcanoShadow:
|
|
i.baseDamage = baseDamage
|