summaryrefslogtreecommitdiff
path: root/UI/CharacterSelect.gd
diff options
context:
space:
mode:
authorDaniel Weipert <code@drogueronin.de>2023-06-18 16:43:22 +0200
committerDaniel Weipert <code@drogueronin.de>2023-06-18 16:43:22 +0200
commit395c25b1fbe51f42decf402f97e51eabcc8c0a77 (patch)
tree72a17c71a39b53d328a76e111ae205d9538d64d0 /UI/CharacterSelect.gd
parent2686ec6d4af6b5437a5f5a5cac008f3d38295f78 (diff)
Godot v3 -> v4
Diffstat (limited to 'UI/CharacterSelect.gd')
-rw-r--r--UI/CharacterSelect.gd10
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")