feat: Establish initial game structure including lobby, UI, and core gameplay managers.
This commit is contained in:
@@ -22,12 +22,25 @@ var original_movement_range: int = 1
|
||||
|
||||
var is_attack_mode: bool = false:
|
||||
set(value):
|
||||
if is_attack_mode == value:
|
||||
return # Prevent infinite recursion / redundant updates
|
||||
|
||||
is_attack_mode = value
|
||||
# Visual feedback for attack mode (Red Tint)
|
||||
if is_attack_mode:
|
||||
_apply_tint_recursive(self, Color(1.0, 0.5, 0.5))
|
||||
else:
|
||||
_apply_tint_recursive(self, Color.WHITE)
|
||||
|
||||
# Sync to others if we are the authority
|
||||
if is_multiplayer_authority():
|
||||
rpc("sync_attack_mode", is_attack_mode)
|
||||
|
||||
@rpc("any_peer", "call_local", "reliable")
|
||||
func sync_attack_mode(state: bool):
|
||||
# We WANT to trigger the setter to apply visuals on clients
|
||||
# Using self.var triggers setter in GDScript
|
||||
self.is_attack_mode = state
|
||||
|
||||
@export var is_bot: bool = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user