2025-11-15 19:33:10 +08:00
|
|
|
extends BulletBase
|
|
|
|
|
class_name Volcano
|
|
|
|
|
|
2025-11-22 08:01:31 +08:00
|
|
|
@onready var textureSword: Sprite2D = $%textureSword
|
|
|
|
|
@onready var anchor: Node2D = $%anchor
|
|
|
|
|
|
2025-11-15 19:33:10 +08:00
|
|
|
var rotates: float = 0
|
|
|
|
|
|
2025-11-16 12:43:20 +08:00
|
|
|
func register():
|
|
|
|
|
animator.speed_scale = launcher.fields.get(FieldStore.Entity.ATTACK_SPEED)
|
2025-11-15 19:33:10 +08:00
|
|
|
func ai():
|
|
|
|
|
PresetBulletAI.lockLauncher(self, launcher, true)
|
2025-11-16 12:43:20 +08:00
|
|
|
rotation = lerp_angle(
|
|
|
|
|
rotation,
|
|
|
|
|
position.angle_to_point(get_global_mouse_position()),
|
|
|
|
|
rotates
|
|
|
|
|
)
|
2025-11-22 08:01:31 +08:00
|
|
|
|
|
|
|
|
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:
|
2025-11-22 08:42:51 +08:00
|
|
|
i.baseDamage = baseDamage
|