OverviewFilesCommitsIssuesDocsReleasesPeers

godot-marble_madness_demo commits / 6bdd310

d
6bdd310c524e2ff0b8b9e549cbf3d305d2e6468f
by Dresk Spidflisk <dreskspidflisk@gmail.com> · 2022-02-04T00:15:51.000Z

Changed files (3) +21 -2

levels/level_script.gd +6 -2
……@@ -3,6 +3,7 @@ extends Node
33# TODO : Make Debug UI dynamic and not hardcoded in the core Hyper scripts.
44onready var hyperdebugui : Control = $HyperGodotDebugUI
55onready var hyperdebugui_gateway_startstop_button : Button = $HyperGodotDebugUI/HypercoreDebugPanel/HypercoreDebugContainer/GatewayStartStopButton
6onready var hyperdebugui_gossipid_list : ItemList = $HyperGodotDebugUI/HypercoreDebugPanel/HypercoreDebugContainer/GossipIDList_Value
67
78onready var gateway : HyperGateway = $HyperGodot/HyperGateway
89onready var gossip : HyperGossip = $HyperGodot/HyperGossip
……@@ -58,6 +59,8 @@ func _on_HyperGateway_started_gateway(_pid : int):
5859 hyperdebugui = get_tree().get_current_scene().get_node("HyperGodotDebugUI")
5960 if !hyperdebugui_gateway_startstop_button:
6061 hyperdebugui_gateway_startstop_button = hyperdebugui.find_node("GatewayStartStopButton")
62 if !hyperdebugui_gossipid_list:
63 hyperdebugui_gossipid_list = hyperdebugui.find_node("GossipIDList_Value")
6164 if !lGatewayStatus:
6265 lGatewayStatus = hyperdebugui.find_node("GatewayStatus_Value")
6366 updateGatewayStatus(_pid)
……@@ -75,6 +78,8 @@ func get_player_object(id):
7578
7679 var remotePlayer = RemotePlayer.instance()
7780 knownPlayers[id] = remotePlayer
81
82 hyperdebugui_gossipid_list.add_item(id, null, false)
7883
7984 add_child(remotePlayer)
8085 _broadcast_player()
……@@ -138,7 +143,6 @@ func _on_remote_player_moved(positionData, id):
138143func _on_PlayerLocal_moved():
139144 _broadcast_player()
140145
141
142func _on_HyperGodotDebugUI_position_update_rate_changed(seconds : float):
146func _on_HyperGodotDebugUI_gossip_update_rate_changed(seconds : float):
143147 gossip_event_timer.wait_time = seconds
144148 gossip_event_timer.start(seconds)
levels/scenes/level_0.tscn +1 -0
……@@ -71,6 +71,7 @@ script = ExtResource( 11 )
7171autostart = true
7272
7373[connection signal="reset_ball" from="special_input" to="Players/PlayerLocal" method="_on_special_input_reset_ball"]
74[connection signal="gossip_update_rate_changed" from="HyperGodotDebugUI" to="." method="_on_HyperGodotDebugUI_gossip_update_rate_changed"]
7475[connection signal="started_gateway" from="HyperGodot/HyperGateway" to="." method="_on_HyperGateway_started_gateway"]
7576[connection signal="stopped_gateway" from="HyperGodot/HyperGateway" to="." method="_on_HyperGateway_stopped_gateway"]
7677[connection signal="event" from="HyperGodot/HyperGossip" to="." method="_on_HyperGossip_event"]
ui/debug/hypercore/ui_debug_hypercore.tscn +14 -0
……@@ -106,5 +106,19 @@ max_value = 5.0
106106step = 0.25
107107value = 1.0
108108
109[node name="GossipIPList" type="Label" parent="HypercoreDebugPanel/HypercoreDebugContainer"]
110margin_top = 80.0
111margin_right = 160.0
112margin_bottom = 94.0
113text = "Gossip ID List :"
114align = 2
115
116[node name="GossipIDList_Value" type="ItemList" parent="HypercoreDebugPanel/HypercoreDebugContainer"]
117margin_left = 164.0
118margin_top = 80.0
119margin_right = 364.0
120margin_bottom = 94.0
121auto_height = true
122
109123[connection signal="button_up" from="HypercoreDebugPanel/HypercoreDebugContainer/GatewayStartStopButton" to="." method="_on_GatewayStartStopButton_button_up"]
110124[connection signal="value_changed" from="HypercoreDebugPanel/HypercoreDebugContainer/GossipUpdateRate_Value" to="." method="_on_GossipUpdateRate_Value_value_changed"]