| … | … | @@ -20,6 +20,8 @@ var requestQueue = [] |
| 20 | 20 | var isRequesting = false |
| 21 | 21 | |
| 22 | 22 | func _ready(): |
| 23 | randomize() | |
| 24 | ||
| 23 | 25 | add_child(peerListRequest) |
| 24 | 26 | peerListRequest.connect("request_completed", self, "_on_peer_list") |
| 25 | 27 | |
| … | … | @@ -73,6 +75,7 @@ func load_peers(): |
| 73 | 75 | |
| 74 | 76 | func _generateEvent(type, data): |
| 75 | 77 | var id = _make_id() |
| 78 | print("generateEvent ID : " + String(id) ) | |
| 76 | 79 | seen_messages.track(id) |
| 77 | 80 | return { |
| 78 | 81 | "id": id, |
| … | … | @@ -51,11 +51,11 @@ func updateBallPhysicsMode() -> void: |
| 51 | 51 | self.linear_velocity = Vector3(0, 0, 0) |
| 52 | 52 | self.mode = RigidBody.MODE_STATIC |
| 53 | 53 | elif(ball_physics_mode == BallPhysicsMode.ENGINE_PHYSICS_ROLL): |
| 54 | lBallPhysicsMode.text = "Engine Physics (Roll)" | |
| 54 | lBallPhysicsMode.text = "Rolling" | |
| 55 | 55 | self.physics_material_override.friction = 1.0 |
| 56 | 56 | self.mode = RigidBody.MODE_RIGID |
| 57 | 57 | else: |
| 58 | lBallPhysicsMode.text = "Engine Physics (Linear)" | |
| 58 | lBallPhysicsMode.text = "Linear" | |
| 59 | 59 | self.physics_material_override.friction = 0.035 |
| 60 | 60 | self.mode = RigidBody.MODE_RIGID |
| 61 | 61 |
| … | … | @@ -1,4 +1,7 @@ |
| 1 | [gd_scene format=2] | |
| 1 | [gd_scene load_steps=2 format=2] | |
| 2 | ||
| 3 | [sub_resource type="StyleBoxFlat" id=1] | |
| 4 | bg_color = Color( 0, 0, 0, 0.470588 ) | |
| 2 | 5 | |
| 3 | 6 | [node name="Control" type="Control"] |
| 4 | 7 | anchor_right = 1.0 |
| … | … | @@ -7,66 +10,83 @@ __meta__ = { |
| 7 | 10 | "_edit_use_anchors_": false |
| 8 | 11 | } |
| 9 | 12 | |
| 10 | [node name="BallInfoContainer" type="GridContainer" parent="."] | |
| 11 | margin_left = 24.0 | |
| 13 | [node name="Panel" type="Panel" parent="."] | |
| 14 | margin_left = 10.0 | |
| 12 | 15 | margin_top = 62.0 |
| 13 | margin_right = 629.0 | |
| 14 | margin_bottom = 285.0 | |
| 16 | margin_right = 373.0 | |
| 17 | margin_bottom = 124.0 | |
| 18 | custom_styles/panel = SubResource( 1 ) | |
| 19 | __meta__ = { | |
| 20 | "_edit_use_anchors_": false | |
| 21 | } | |
| 22 | ||
| 23 | [node name="BallInfoMarginContainer" type="MarginContainer" parent="Panel"] | |
| 24 | margin_left = 4.0 | |
| 25 | margin_top = 6.0 | |
| 26 | margin_right = 147.0 | |
| 27 | margin_bottom = 56.0 | |
| 28 | __meta__ = { | |
| 29 | "_edit_use_anchors_": false | |
| 30 | } | |
| 31 | ||
| 32 | [node name="BallInfoContainer" type="GridContainer" parent="Panel/BallInfoMarginContainer"] | |
| 33 | margin_right = 143.0 | |
| 34 | margin_bottom = 50.0 | |
| 15 | 35 | columns = 2 |
| 16 | 36 | __meta__ = { |
| 17 | 37 | "_edit_use_anchors_": false |
| 18 | 38 | } |
| 19 | 39 | |
| 20 | [node name="BallVelocity" type="Label" parent="BallInfoContainer"] | |
| 21 | margin_right = 139.0 | |
| 40 | [node name="BallVelocity" type="Label" parent="Panel/BallInfoMarginContainer/BallInfoContainer"] | |
| 41 | margin_right = 111.0 | |
| 22 | 42 | margin_bottom = 14.0 |
| 23 | text = "Ball Velocity :" | |
| 43 | text = "Velocity :" | |
| 24 | 44 | align = 2 |
| 25 | 45 | __meta__ = { |
| 26 | 46 | "_edit_use_anchors_": false |
| 27 | 47 | } |
| 28 | 48 | |
| 29 | [node name="BallVelocity_Value" type="Label" parent="BallInfoContainer"] | |
| 30 | margin_left = 143.0 | |
| 31 | margin_right = 143.0 | |
| 49 | [node name="BallVelocity_Value" type="Label" parent="Panel/BallInfoMarginContainer/BallInfoContainer"] | |
| 50 | margin_left = 115.0 | |
| 51 | margin_right = 115.0 | |
| 32 | 52 | margin_bottom = 14.0 |
| 33 | 53 | __meta__ = { |
| 34 | 54 | "_edit_use_anchors_": false |
| 35 | 55 | } |
| 36 | 56 | |
| 37 | [node name="BallAngularVelocity" type="Label" parent="BallInfoContainer"] | |
| 57 | [node name="BallAngularVelocity" type="Label" parent="Panel/BallInfoMarginContainer/BallInfoContainer"] | |
| 38 | 58 | margin_top = 18.0 |
| 39 | margin_right = 139.0 | |
| 59 | margin_right = 111.0 | |
| 40 | 60 | margin_bottom = 32.0 |
| 41 | text = "Ball Angular Velocity :" | |
| 61 | text = "Angular Velocity :" | |
| 42 | 62 | align = 2 |
| 43 | 63 | __meta__ = { |
| 44 | 64 | "_edit_use_anchors_": false |
| 45 | 65 | } |
| 46 | 66 | |
| 47 | [node name="BallAngularVelocity_Value" type="Label" parent="BallInfoContainer"] | |
| 48 | margin_left = 143.0 | |
| 67 | [node name="BallAngularVelocity_Value" type="Label" parent="Panel/BallInfoMarginContainer/BallInfoContainer"] | |
| 68 | margin_left = 115.0 | |
| 49 | 69 | margin_top = 18.0 |
| 50 | margin_right = 143.0 | |
| 70 | margin_right = 115.0 | |
| 51 | 71 | margin_bottom = 32.0 |
| 52 | 72 | __meta__ = { |
| 53 | 73 | "_edit_use_anchors_": false |
| 54 | 74 | } |
| 55 | 75 | |
| 56 | [node name="BallPhysicsMode" type="Label" parent="BallInfoContainer"] | |
| 76 | [node name="BallPhysicsMode" type="Label" parent="Panel/BallInfoMarginContainer/BallInfoContainer"] | |
| 57 | 77 | margin_top = 36.0 |
| 58 | margin_right = 139.0 | |
| 78 | margin_right = 111.0 | |
| 59 | 79 | margin_bottom = 50.0 |
| 60 | text = "Ball Physics Mode :" | |
| 80 | text = "Physics :" | |
| 61 | 81 | align = 2 |
| 62 | 82 | __meta__ = { |
| 63 | 83 | "_edit_use_anchors_": false |
| 64 | 84 | } |
| 65 | 85 | |
| 66 | [node name="BallPhysicsMode_Value" type="Label" parent="BallInfoContainer"] | |
| 67 | margin_left = 143.0 | |
| 86 | [node name="BallPhysicsMode_Value" type="Label" parent="Panel/BallInfoMarginContainer/BallInfoContainer"] | |
| 87 | margin_left = 115.0 | |
| 68 | 88 | margin_top = 36.0 |
| 69 | margin_right = 143.0 | |
| 89 | margin_right = 115.0 | |
| 70 | 90 | margin_bottom = 50.0 |
| 71 | 91 | __meta__ = { |
| 72 | 92 | "_edit_use_anchors_": false |
| … | … | @@ -41,39 +41,20 @@ __meta__ = { |
| 41 | 41 | "_edit_use_anchors_": false |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | [node name="Label" type="Label" parent="HypercoreDebugPanel/HypercoreDebugContainer"] | |
| 44 | [node name="GatewayStatus_Value" type="Label" parent="HypercoreDebugPanel/HypercoreDebugContainer"] | |
| 45 | 45 | margin_left = 164.0 |
| 46 | 46 | margin_top = 3.0 |
| 47 | margin_right = 364.0 | |
| 47 | margin_right = 514.0 | |
| 48 | 48 | margin_bottom = 17.0 |
| 49 | __meta__ = { | |
| 50 | "_edit_use_anchors_": false | |
| 51 | } | |
| 52 | ||
| 53 | [node name="GatewayStatus" type="Label" parent="HypercoreDebugPanel/HypercoreDebugContainer"] | |
| 54 | margin_top = 24.0 | |
| 55 | margin_right = 160.0 | |
| 56 | margin_bottom = 38.0 | |
| 57 | text = "Gateway Status :" | |
| 58 | align = 2 | |
| 59 | __meta__ = { | |
| 60 | "_edit_use_anchors_": false | |
| 61 | } | |
| 62 | ||
| 63 | [node name="GatewayStatus_Value" type="Label" parent="HypercoreDebugPanel/HypercoreDebugContainer"] | |
| 64 | margin_left = 164.0 | |
| 65 | margin_top = 24.0 | |
| 66 | margin_right = 364.0 | |
| 67 | margin_bottom = 38.0 | |
| 68 | 49 | text = "Not Running" |
| 69 | 50 | __meta__ = { |
| 70 | 51 | "_edit_use_anchors_": false |
| 71 | 52 | } |
| 72 | 53 | |
| 73 | 54 | [node name="GossipURL" type="Label" parent="HypercoreDebugPanel/HypercoreDebugContainer"] |
| 74 | margin_top = 42.0 | |
| 55 | margin_top = 24.0 | |
| 75 | 56 | margin_right = 160.0 |
| 76 | margin_bottom = 56.0 | |
| 57 | margin_bottom = 38.0 | |
| 77 | 58 | text = "Gossip URL :" |
| 78 | 59 | align = 2 |
| 79 | 60 | __meta__ = { |
| … | … | @@ -82,42 +63,43 @@ __meta__ = { |
| 82 | 63 | |
| 83 | 64 | [node name="GossipURL_Value" type="Label" parent="HypercoreDebugPanel/HypercoreDebugContainer"] |
| 84 | 65 | margin_left = 164.0 |
| 85 | margin_top = 42.0 | |
| 86 | margin_right = 364.0 | |
| 87 | margin_bottom = 56.0 | |
| 66 | margin_top = 24.0 | |
| 67 | margin_right = 514.0 | |
| 68 | margin_bottom = 38.0 | |
| 88 | 69 | text = "N/A" |
| 89 | 70 | |
| 90 | 71 | [node name="GossipUpdateRate" type="Label" parent="HypercoreDebugPanel/HypercoreDebugContainer"] |
| 91 | margin_top = 61.0 | |
| 72 | margin_top = 43.0 | |
| 92 | 73 | margin_right = 160.0 |
| 93 | margin_bottom = 75.0 | |
| 74 | margin_bottom = 57.0 | |
| 94 | 75 | rect_min_size = Vector2( 160, 0 ) |
| 95 | 76 | text = "Gossip in 1 Seconds :" |
| 96 | 77 | align = 2 |
| 97 | 78 | |
| 98 | 79 | [node name="GossipUpdateRate_Value" type="HSlider" parent="HypercoreDebugPanel/HypercoreDebugContainer"] |
| 99 | 80 | margin_left = 164.0 |
| 100 | margin_top = 60.0 | |
| 101 | margin_right = 364.0 | |
| 102 | margin_bottom = 76.0 | |
| 81 | margin_top = 42.0 | |
| 82 | margin_right = 514.0 | |
| 83 | margin_bottom = 58.0 | |
| 103 | 84 | rect_min_size = Vector2( 200, 0 ) |
| 104 | min_value = 0.25 | |
| 85 | min_value = 0.1 | |
| 105 | 86 | max_value = 5.0 |
| 106 | step = 0.25 | |
| 107 | value = 1.0 | |
| 87 | step = 0.1 | |
| 88 | value = 0.5 | |
| 108 | 89 | |
| 109 | 90 | [node name="GossipIPList" type="Label" parent="HypercoreDebugPanel/HypercoreDebugContainer"] |
| 110 | margin_top = 80.0 | |
| 91 | margin_top = 62.0 | |
| 111 | 92 | margin_right = 160.0 |
| 112 | margin_bottom = 94.0 | |
| 93 | margin_bottom = 76.0 | |
| 113 | 94 | text = "Gossip ID List :" |
| 114 | 95 | align = 2 |
| 115 | 96 | |
| 116 | 97 | [node name="GossipIDList_Value" type="ItemList" parent="HypercoreDebugPanel/HypercoreDebugContainer"] |
| 117 | 98 | margin_left = 164.0 |
| 118 | margin_top = 80.0 | |
| 119 | margin_right = 364.0 | |
| 120 | margin_bottom = 94.0 | |
| 99 | margin_top = 62.0 | |
| 100 | margin_right = 514.0 | |
| 101 | margin_bottom = 76.0 | |
| 102 | rect_min_size = Vector2( 350, 0 ) | |
| 121 | 103 | auto_height = true |
| 122 | 104 | |
| 123 | 105 | [connection signal="button_up" from="HypercoreDebugPanel/HypercoreDebugContainer/GatewayStartStopButton" to="." method="_on_GatewayStartStopButton_button_up"] |