mirror of
https://git.kittycat.homes/zoe/codename-routes.git
synced 2024-08-15 03:18:26 +00:00
23 lines
516 B
GDScript
23 lines
516 B
GDScript
extends Node
|
|
|
|
onready var server = $StateServer
|
|
|
|
export var xsize = 512
|
|
export var ysize = 512
|
|
export var zsize = 124
|
|
|
|
var Tilemap = preload("res://world/Tilemap.tscn")
|
|
var tilemaps = []
|
|
|
|
func _ready():
|
|
server.generate_world(xsize, ysize, zsize)
|
|
print(server.get_tile_at(xsize -1,ysize -1,zsize-1))
|
|
|
|
func _on_StateServer_request_full_reload():
|
|
respawn_tilemaps(zsize - 1)
|
|
|
|
func respawn_tilemaps(amount):
|
|
tilemaps = []
|
|
for tile in range(0, amount + 1):
|
|
add_child(Tilemap.instance())
|
|
tilemaps.push_back(tile)
|