add killzone and convert Tilemap to Tilelayer

This commit is contained in:
2025-10-20 14:13:36 +01:00
parent 2c584fcbbf
commit 07fb832b0a
5 changed files with 42 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
extends Area2D
func _on_body_entered(body: Node2D) -> void:
func _on_body_entered(_body: Node2D) -> void:
print("Plus 1 coin")
queue_free()

11
scripts/killzone.gd Normal file
View File

@@ -0,0 +1,11 @@
extends Area2D
@onready var timer: Timer = $Timer
func _on_body_entered(_body: Node2D) -> void:
print("You died.")
timer.start()
func _on_timer_timeout() -> void:
get_tree().reload_current_scene()

1
scripts/killzone.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://cc1vfgnshjrgf