25 lines
476 B
GDScript
25 lines
476 B
GDScript
extends Enemy
|
|
|
|
@export var multi_shoot_speed = 0.0
|
|
|
|
func multi_shoot():
|
|
shoot_speed.x = multi_shoot_speed
|
|
shoot_speed.y = 0.0
|
|
shoot(%Right.global_position)
|
|
|
|
shoot_speed.x = -multi_shoot_speed
|
|
shoot_speed.y = 0.0
|
|
shoot(%Left.global_position)
|
|
|
|
shoot_speed.y = multi_shoot_speed
|
|
shoot_speed.x = 0.0
|
|
shoot(%Down.global_position)
|
|
|
|
shoot_speed.y = -multi_shoot_speed
|
|
shoot_speed.x = 0.0
|
|
shoot(%Up.global_position)
|
|
|
|
|
|
|
|
func _on_timer_timeout() -> void:
|
|
multi_shoot()
|