Added Map Loader to Game to allow for map swaping in the future
This commit is contained in:
10
Assets/scripts/MapLoader.gd
Normal file
10
Assets/scripts/MapLoader.gd
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
extends Node3D
|
||||||
|
|
||||||
|
var Default_Map = "res://Assets/Levels/test_map.tscn"
|
||||||
|
|
||||||
|
func openMap(map_location):
|
||||||
|
var map_instance = load(map_location).instantiate()
|
||||||
|
add_child(map_instance)
|
||||||
|
|
||||||
|
func _init():
|
||||||
|
openMap(Default_Map)
|
||||||
Reference in New Issue
Block a user