diff --git a/scenes/game.tscn b/scenes/game.tscn index 3b92862..bf9eba2 100644 --- a/scenes/game.tscn +++ b/scenes/game.tscn @@ -1,7 +1,6 @@ -[gd_scene load_steps=6 format=4 uid="uid://co1x3hlc2efr6"] +[gd_scene load_steps=5 format=4 uid="uid://co1x3hlc2efr6"] [ext_resource type="Script" path="res://scripts/match/ui/opponent_name.gd" id="1_saby1"] -[ext_resource type="Script" path="res://scripts/match/ui/current_game_time.gd" id="2_3jcub"] [ext_resource type="TileSet" uid="uid://cvp867israfjk" path="res://tile_set.tres" id="3_0etcd"] [ext_resource type="Script" path="res://scripts/match/map.gd" id="4_4c550"] @@ -35,24 +34,6 @@ scroll_active = false autowrap_mode = 0 script = ExtResource("1_saby1") -[node name="Time" type="RichTextLabel" parent="UI/HUD"] -layout_mode = 1 -anchors_preset = 8 -anchor_left = 0.5 -anchor_top = 0.5 -anchor_right = 0.5 -anchor_bottom = 0.5 -offset_left = -20.0 -offset_top = -20.0 -offset_right = 20.0 -offset_bottom = 20.0 -grow_horizontal = 2 -grow_vertical = 2 -fit_content = true -scroll_active = false -autowrap_mode = 0 -script = ExtResource("2_3jcub") - [node name="Seperator" type="Panel" parent="UI/HUD"] custom_minimum_size = Vector2(4, 0) layout_mode = 1 diff --git a/scripts/channel/match/match_channel.gd b/scripts/channel/match/match_channel.gd index f359650..928c73f 100644 --- a/scripts/channel/match/match_channel.gd +++ b/scripts/channel/match/match_channel.gd @@ -14,7 +14,7 @@ func _process(_delta: float) -> void: return while self.socket.get_available_packet_count(): var msg: Message = ( - CurrentUnixTimeMessage + Message . deserialize( self.socket.get_packet().get_string_from_utf8(), [TowerPlacedMessage, InvalidPlacementMessage], diff --git a/scripts/match/ui/current_game_time.gd b/scripts/match/ui/current_game_time.gd deleted file mode 100644 index de52222..0000000 --- a/scripts/match/ui/current_game_time.gd +++ /dev/null @@ -1,9 +0,0 @@ -extends RichTextLabel - - -func _ready() -> void: - MatchChannel.connect("on_match_update", on_match_update) - - -func on_match_update(msg: CurrentUnixTimeMessage) -> void: - self.text = str(msg.time)