👽️ save state

This commit is contained in:
anyreso 2024-04-27 18:02:16 -04:00
parent 5b20ac2f2a
commit 32a1b73cee
11 changed files with 43 additions and 53 deletions

View file

@ -39,14 +39,11 @@ func _ready() -> void:
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta : float) -> void:
var velocity_xz : Vector3 = player.linear_velocity
velocity_xz.y = 0
text = \"\"
text += \"fps: %d (%.2f mspf)\\n\" % [Engine.get_frames_per_second(), 1000.0 / Engine.get_frames_per_second()]
text += \"position: %d, %d, %d\\n\" % [player.position.x, player.position.y, player.position.z]
text += \"speed: %d km/h\\n\" % (player.linear_velocity.length() * 3.6)
var velocity_xz := Vector3(player.linear_velocity.x, 0., player.linear_velocity.z)
text += \"speed_xz: %d km/h\\n\" % (velocity_xz.length() * 3.6)
var viewport_render_size : Vector2i = get_viewport().size * get_viewport().scaling_3d_scale
text += \"3D viewport resolution: %d × %d (%d%%)\\n\" \\
@ -148,6 +145,7 @@ value = 60.0
show_percentage = false
[node name="Spacer" type="Control" parent="MarginContainer/HBoxContainer"]
visible = false
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 0.8

View file

@ -320,7 +320,6 @@ func _ready() -> void:
self.item_selected.emit(self.selected)
func _on_item_selected(index: int) -> void:
print(\"here\")
Settings.set_value(\"ui\", \"scale\", clamp(index, 0, 2))
# When the screen changes size, we need to update the 3D
# viewport quality setting. If we don't do this, the viewport will take