2021-04-23 20:16:43 +00:00
|
|
|
extends Node2D
|
|
|
|
|
|
|
|
func load_scene(map_data):
|
2022-10-10 19:15:51 +00:00
|
|
|
#$background.tile_set = load("base_tilemap/tilesets/background_ts.tres")
|
|
|
|
#$vegetation.tile_set = load("res://river_intersection_home2.tscn::1")
|
2021-05-26 20:02:51 +00:00
|
|
|
|
2022-10-08 18:42:29 +00:00
|
|
|
# for x in range(map_data.width):
|
|
|
|
# for y in range(map_data.height):
|
|
|
|
# $background.set_cell(x, y, map_data.background_map[x][y])
|
|
|
|
# $vegetation.set_cell(x, y, -1)
|
|
|
|
# $interaction_map.set_cell(x, y, -1)
|
|
|
|
# $player_interaction.set_cell(x, y, -1)
|
|
|
|
|
|
|
|
var scene = load(map_data+".tscn")
|
|
|
|
print("MAP NAME ",map_data+".tscn")
|
|
|
|
var map = scene.instance()
|
|
|
|
return map
|
|
|
|
|
2021-04-25 10:36:01 +00:00
|
|
|
|
2021-04-23 20:16:43 +00:00
|
|
|
func _ready():
|
2022-10-08 18:42:29 +00:00
|
|
|
self.add_child(load_scene("res://Maps/river_intersection"))
|
|
|
|
# var scene = load("res://Maps/river_intersection.tscn")
|
|
|
|
# var map = scene.instance()
|
|
|
|
# self.add_child(map)
|