JulyGame/scripts/gamecontroller.gd

26 lines
621 B
GDScript3
Raw Normal View History

extends Node2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
2025-08-12 01:03:02 +00:00
func _on_area_2d_area_trigger_signal(effect: String, body: Node2D) -> void:
if body.name == "world-boundary":
return
if body is Player:
return
print("GC sees trigger " + effect + " on " + body.name)
body.queue_free()
func bulletDamage(target: Node2D, bullet: Node2D):
print("game controller sees hit")
target.queue_free()
bullet.visible = false