Visibility brought back

This commit is contained in:
Rendo 2025-12-07 14:55:41 +05:00
commit f5f93104fc
2 changed files with 14 additions and 4 deletions

View file

@ -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