grounders-slowjam-2024/level/level.gd

11 lines
274 B
GDScript3
Raw Normal View History

2024-05-25 17:15:59 -06:00
extends Node3D
2024-05-25 18:44:52 -06:00
func _ready():
# Hacky way to start level without going though multiplayer screens
if get_parent() == get_tree().root:
2024-05-25 18:47:51 -06:00
%PlayerSpawner.spawn(multiplayer.get_unique_id())
2024-05-25 18:44:52 -06:00
2024-05-25 17:15:59 -06:00
# Called from the server
func server_add_player(id: int):
%PlayerSpawner.spawn(id)