starcheese/cheeseCollision.gd

19 lines
364 B
GDScript3
Raw Permalink Normal View History

2024-10-01 16:43:34 +02:00
extends Area2D
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_body_entered(body):
if body.name == "spaceship":
queue_free() # This removes the cheese from the scene
print("Cheese collected!") # Replace this with actual game logic