grounders-slowjam-2024/level/level.gd

13 lines
387 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:
var player := preload("res://player/player.tscn").instantiate()
player.add_child(preload("res://camera/camera.tscn").instantiate())
%Players.add_child(player)
2024-05-25 17:15:59 -06:00
# Called from the server
func server_add_player(id: int):
%PlayerSpawner.spawn(id)