Skip to content

Commit

Permalink
Red timer color
Browse files Browse the repository at this point in the history
  • Loading branch information
DragonCat4012 committed Apr 27, 2024
1 parent a128922 commit 2c41b5f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Scenes/game.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ text = "OwO
custom_minimum_size = Vector2(100, 80)
layout_mode = 2
size_flags_horizontal = 4
theme_override_colors/font_color = Color(0.564962, 0.564962, 0.564962, 1)
theme_override_fonts/font = ExtResource("2_q8ujg")
theme_override_font_sizes/font_size = 70
text = "OwO
Expand Down Expand Up @@ -213,4 +214,5 @@ text = "uwu"

[node name="MapLabel" type="Label" parent="CenterContainer3/HBoxContainer"]
layout_mode = 2
theme_override_colors/font_color = Color(0.564706, 0.564706, 0.564706, 1)
text = "[ ]"
8 changes: 7 additions & 1 deletion game.gd
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ func _on_timer_timeout():
func _process(delta):
if Input.is_action_just_pressed("ui_cancel"):
get_tree().change_scene_to_file("res://Scenes/menu.tscn") # TODO: meh
timerLabel.text = str(round(timer.time_left))
timerLabel.text = str(round(timer.time_left)) + " s"

if timer.time_left <= 5:
var red = Color(1.0,0.0,0.0,1.0)
timerLabel.set("theme_override_colors/font_color",red)

func loadOptions():
if FileAccess.file_exists((File_name)):
Expand All @@ -115,6 +119,8 @@ func _init_game():

updateEndian()
timer.wait_time = 50
var white = Color(1.0,1.0,1.0,1.0)
timerLabel.set("theme_override_colors/font_color", white)
timer.start()

func updateEndian():
Expand Down

0 comments on commit 2c41b5f

Please sign in to comment.