Same as prev, but better
This commit is contained in:
parent
ba14ca7ea0
commit
ef5ceb0b95
|
@ -10,6 +10,5 @@ func spawn_player(owner_id: int):
|
|||
if multiplayer.get_unique_id() == owner_id:
|
||||
var camera := preload("res://camera/camera.tscn").instantiate()
|
||||
player.add_child(camera)
|
||||
player.position.y = 5.0
|
||||
return player
|
||||
|
||||
|
|
|
@ -3,9 +3,7 @@ extends Node3D
|
|||
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)
|
||||
%PlayerSpawner.spawn(multiplayer.get_unique_id())
|
||||
|
||||
# Called from the server
|
||||
func server_add_player(id: int):
|
||||
|
|
Loading…
Reference in New Issue