Visibility brought back
This commit is contained in:
parent
66e8707940
commit
f5f93104fc
2 changed files with 14 additions and 4 deletions
|
|
@ -1,9 +1,12 @@
|
|||
extends Node
|
||||
|
||||
class_name PlayerBasedVisibility
|
||||
|
||||
@export var visible_for_others: bool = false
|
||||
@export var reference_player: Player
|
||||
|
||||
func _ready() -> void:
|
||||
get_parent().visible = (get_multiplayer_authority() != multiplayer.get_unique_id()) == visible_for_others
|
||||
get_parent().visible = (reference_player.player_id != multiplayer.get_unique_id()) == visible_for_others
|
||||
|
||||
func reverse() -> void:
|
||||
get_parent().visible = not get_parent().visible
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue