ape-ame/eptagon.gd
Ultrablob 88c05bbd8c
All checks were successful
CI / build (push) Successful in 2m52s
new input system, add pausing
2025-02-07 13:37:10 -05:00

22 lines
533 B
GDScript

extends StaticBody2D
var dying = false
# Called when the node enters the scene tree for the first time.
func _ready():
$Turret.target = $"../Player"
#print($Turret.target)
func destroy():
if dying:
return
dying = true
var explosion = load("res://explosion.tscn").instantiate()
$"/root/Node2D".add_child(explosion)
explosion.global_position = global_position
await get_tree().create_timer(0.2).timeout
queue_free()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass