gmtk-2024/scripts/killbox.gd

15 lines
386 B
GDScript

extends Area2D
@onready var kill_area = $VirulingKillArea
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
body_entered.connect(kill_enemy)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func kill_enemy(node: Node) -> void:
if node is Viruling:
node.is_dying = true