Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
FLuplow committed Jul 9, 2023
2 parents df1abf6 + 03a0ccf commit 4a42a42
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
5 changes: 5 additions & 0 deletions scenes/World.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ extends Node3D
@onready var pauseMenu: Control = $pause_menu
@onready var timer: RichTextLabel = $UI/Timer
@onready var finalTime: Label = $"UI/Game Over/VBoxContainer/Time"
@onready var height: RichTextLabel = $"UI/Height"
@onready var gameOver: CenterContainer = $"UI/Game Over"
var target_rot: float = 0.0
@export_range(1, 10) var snappiness: float = 1.0
Expand All @@ -19,6 +20,7 @@ func _ready():
npc.freeze = true

func _process(delta):
set_height()
if(!Global.gameState == Global.GameStates.RUNNING):
return

Expand Down Expand Up @@ -49,6 +51,9 @@ func get_rotated(delta):

func set_timer_time(time: String):
timer.text = time

func set_height():
height.text = "Elevation: %.01fm" % (npc.position.y + 5.376)

func _on_pause_menu_resume():
pauseMenu.close()
Expand Down
26 changes: 18 additions & 8 deletions scenes/main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[ext_resource type="AudioStream" uid="uid://dfcbldifwfqy7" path="res://audio/Collision sounds/sfx_collision-004.wav" id="4_j8wot"]
[ext_resource type="AudioStream" uid="uid://dcvohfpqmms56" path="res://audio/main_theme_loop.ogg" id="5_3n2do"]
[ext_resource type="AudioStream" uid="uid://bbakhdxf5kvg1" path="res://audio/Collision sounds/sfx_random_01.wav" id="6_exftb"]
[ext_resource type="PackedScene" uid="uid://byb4hk8l12noc" path="res://assets/objects/realistic/Bed.tscn" id="7_6ga6s"]
[ext_resource type="PackedScene" uid="uid://7fbbtmdihu33" path="res://assets/objects/realistic/Bed.tscn" id="7_6ga6s"]
[ext_resource type="AudioStream" uid="uid://dpme1ekigrjux" path="res://audio/Collision sounds/sfx_random_02.wav" id="7_pgumy"]
[ext_resource type="PackedScene" uid="uid://dyyyf8a84slbg" path="res://assets/objects/cartoon/Grapes.tscn" id="8_6svsk"]
[ext_resource type="AudioStream" uid="uid://svisq3x2w533" path="res://audio/Collision sounds/sfx_random_03.wav" id="8_46bg5"]
Expand All @@ -22,7 +22,7 @@
[ext_resource type="PackedScene" uid="uid://ckspgvw2lh580" path="res://assets/objects/cartoon/Cheese.tscn" id="10_gcnkk"]
[ext_resource type="PackedScene" uid="uid://jqgaqar5h5k0" path="res://assets/objects/realistic/GoldRing.tscn" id="10_pjyk1"]
[ext_resource type="AudioStream" uid="uid://d3japko0vopor" path="res://audio/Collision sounds/sfx_stone_01.wav" id="10_sxmil"]
[ext_resource type="PackedScene" uid="uid://ck6aqce5f0fej" path="res://assets/objects/realistic/spoon.tscn" id="11_1vr5n"]
[ext_resource type="PackedScene" uid="uid://7h8lo6udj060" path="res://assets/objects/realistic/spoon.tscn" id="11_1vr5n"]
[ext_resource type="AudioStream" uid="uid://h88kwvq41fxy" path="res://audio/Collision sounds/sfx_stone_02.wav" id="11_56hmm"]
[ext_resource type="AudioStream" uid="uid://bd23mkfj4t6k2" path="res://audio/Collision sounds/sfx_stone_03.wav" id="12_7kejf"]
[ext_resource type="AudioStream" uid="uid://djynoyygwrjhb" path="res://audio/Collision sounds/sfx_stone_04.wav" id="13_ow4dn"]
Expand Down Expand Up @@ -66,7 +66,7 @@
[ext_resource type="PackedScene" path="res://assets/objects/realistic/WoodenBarrel.tscn" id="34_lknms"]
[ext_resource type="PackedScene" uid="uid://dwisumk7ft2ss" path="res://assets/objects/realistic/IroningBoard.tscn" id="36_ghra3"]
[ext_resource type="PackedScene" uid="uid://bngjwsdds4buc" path="res://assets/objects/realistic/pipe_organ.tscn" id="37_co23h"]
[ext_resource type="PackedScene" path="res://assets/objects/realistic/TooriGate.tscn" id="40_7s35u"]
[ext_resource type="PackedScene" uid="uid://jm63qd7qs3f" path="res://assets/objects/realistic/TooriGate.tscn" id="40_7s35u"]
[ext_resource type="PackedScene" uid="uid://b84qar3kdrdeh" path="res://scenes/goal.tscn" id="41_nh3p5"]
[ext_resource type="PackedScene" uid="uid://cy17o4h6mm7k6" path="res://assets/objects/realistic/SilverRing.tscn" id="43_7vxta"]
[ext_resource type="PackedScene" uid="uid://1t7kidujc3pg" path="res://assets/objects/fruits/mandarin.tscn" id="44_wfwwb"]
Expand Down Expand Up @@ -548,16 +548,26 @@ bus = &"Music"

[node name="UI" type="CanvasLayer" parent="."]

[node name="Timer" type="RichTextLabel" parent="UI"]
offset_left = 8.0
offset_top = 8.0
offset_right = 72.0
offset_bottom = 48.0
[node name="Height" type="RichTextLabel" parent="UI"]
offset_left = 16.0
offset_top = 16.0
offset_right = 136.0
offset_bottom = 56.0
text = "Time: 00:00:000"
fit_content = true
scroll_active = false
autowrap_mode = 0

[node name="Timer" type="RichTextLabel" parent="UI"]
offset_left = 16.0
offset_top = 42.0
offset_right = 136.0
offset_bottom = 82.0
text = "Height: 0m"
fit_content = true
scroll_active = false
autowrap_mode = 0

[node name="Game Over" type="CenterContainer" parent="UI"]
visible = false
anchors_preset = 15
Expand Down

0 comments on commit 4a42a42

Please sign in to comment.