diff options
Diffstat (limited to 'UI/CharacterSelect.gd')
-rw-r--r-- | UI/CharacterSelect.gd | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/UI/CharacterSelect.gd b/UI/CharacterSelect.gd index bc6dab1..6ae7de0 100644 --- a/UI/CharacterSelect.gd +++ b/UI/CharacterSelect.gd @@ -20,9 +20,9 @@ func set_Wait_text(): func set_bg_color_selected(character, previous_character = null): if previous_character: - get_node(previous_character + "Panel").set("custom_styles/panel", self.style_deselected) + get_node(previous_character + "Panel").set("theme_override_styles/panel", self.style_deselected) - get_node(character + "Panel").set("custom_styles/panel", self.style_selected) + get_node(character + "Panel").set("theme_override_styles/panel", self.style_selected) func _button_pressed(event, character): @@ -33,12 +33,12 @@ func _button_pressed(event, character): Network.player.character = character -sync func _character_selected(character): - var id = get_tree().get_rpc_sender_id() +@rpc("any_peer", "call_local") func _character_selected(character): + var id = multiplayer.get_remote_sender_id() if Network.players.has(id): Network.players[id].character = character self.players_selected[id] = true self.set_Wait_text() if Network.get_player_count() == self.players_selected.size(): - get_tree().change_scene("res://UI/LevelSelect.tscn") + get_tree().change_scene_to_file("res://UI/LevelSelect.tscn") |