From 395c25b1fbe51f42decf402f97e51eabcc8c0a77 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 18 Jun 2023 16:43:22 +0200 Subject: Godot v3 -> v4 --- UI/CharacterSelect.gd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'UI/CharacterSelect.gd') 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") -- cgit v1.2.3