Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
manglemix committed Feb 14, 2024
2 parents 046ad0d + 70abf57 commit e608f87
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lunabase/lunabot.gd
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ func is_lunabot_connected() -> bool:


class Statistics:
var data_received: int
var packet_loss: int
var data_received: float
var packet_loss: float
var delta: float


Expand Down
8 changes: 7 additions & 1 deletion lunabase/main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ Packet Throttle: %s\"\"\" % [total_bytes, ping, roundi(packet_loss * 100), round
script/source = "extends Label


const TOO_LONG := 3.0

var timer := 0.0


Expand All @@ -76,6 +78,9 @@ func _process(delta: float) -> void:
text = \"Last Received: 10000+ ms\"
else:
text = \"Last Received: %s ms\" % [roundi(timer * 1000)]
var strength := minf(timer, TOO_LONG) / TOO_LONG
modulate.g = 1.0 - strength
modulate.r = strength
"
[sub_resource type="GDScript" id="GDScript_67ds2"]
Expand Down Expand Up @@ -622,6 +627,7 @@ text = "Not Connected"
script = SubResource("GDScript_wemvy")
[node name="LastReceived" type="Label" parent="Controller/Control/VBoxContainer3"]
modulate = Color(0, 1, 0, 1)
layout_mode = 2
size_flags_horizontal = 0
text = "Last Received:"
Expand Down Expand Up @@ -817,7 +823,7 @@ stretch = true
[node name="SubViewport" type="SubViewport" parent="Sim/AspectRatioContainer/SubViewportContainer"]
handle_input_locally = false
msaa_3d = 1
size = Vector2i(628, 348)
size = Vector2i(2, 2)
render_target_update_mode = 0
[node name="Node3D" type="Node3D" parent="Sim/AspectRatioContainer/SubViewportContainer/SubViewport"]
Expand Down

0 comments on commit e608f87

Please sign in to comment.