Generate basic world & recieve data on client
This commit is contained in:
15
client/scripts/singletons/WorldManager.gd
Normal file
15
client/scripts/singletons/WorldManager.gd
Normal file
@ -0,0 +1,15 @@
|
||||
extends Node
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
ServerConnection.connect("tile_update", self, "on_tile_update")
|
||||
yield(ServerConnection.join_world_async(), "completed")
|
||||
|
||||
func on_tile_update(tile_data):
|
||||
print(tile_data)
|
Reference in New Issue
Block a user