End of lesson 26

This commit is contained in:
2025-04-17 18:02:54 -03:00
parent 68373a3820
commit c586c869b3
9 changed files with 48 additions and 11 deletions

View File

@@ -1,7 +1,5 @@
extends Node
@export var entities:Node
var map:Map
func _ready():
@@ -20,7 +18,7 @@ func loadMap(newMapPath, spawnpoint, facing):
add_child(map)
entities.add_child(map.spawnPlayerAtPosition(spawnpoint, facing))
map.get_node("Entities").add_child(map.spawnPlayerAtPosition(spawnpoint, facing))
GameManager.currentMap = newMapPath

View File

@@ -0,0 +1,11 @@
extends Area2D
class_name MapEntity
func execute(target):
print(target.name)
func _on_area_entered(area: Area2D) -> void:
execute(area.get_parent())

View File

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