make player add and remove itself from referencer
This commit is contained in:
@@ -28,6 +28,15 @@ func _ready() -> void:
|
||||
|
||||
_respawn_point = global_position
|
||||
_camera.make_current()
|
||||
Referencer.player = self
|
||||
Referencer.main_camera = _camera
|
||||
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if not is_multiplayer_authority():
|
||||
return
|
||||
Referencer.player = null
|
||||
Referencer.main_camera = null
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
|
||||
Reference in New Issue
Block a user