End of lesson 26
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user