RingOfRaces/MiscCodes/Menu.gd

25 lines
772 B
GDScript3
Raw Normal View History

extends Node2D
func _ready():
pass # Replace with function body.
func _on_Btn_PlayGame_pressed():
Global.LoadSave()
Global.GoToScene("river_intersection_home_2")
2021-04-23 20:16:43 +00:00
return
Global.LoadSave()
var game_data = GlobalStructures.base_tilemap.new()
var map_data = [[]]
for x in range(150):
map_data.append([])
for y in range(150):
map_data[x].append(int(rand_range(0, 6)))
game_data.init_map(150, 150, "res://omgeving/Floor.tres",map_data, "res://omgeving/Floor.tres", map_data, "res://omgeving/Floor.tres", map_data, "res://omgeving/Floor.tres", map_data)
var game = load("res://base_tilemap/base_tilemap.tscn").instance()
game.load_scene(game_data)
get_tree().get_root().add_child(game)
2021-04-15 20:14:31 +00:00
func _on_Btn_LoadGame_pressed():
Global.GoToScene("loadgame_screen")