Fixed many Bugy and added Labels for Time and Score
This commit is contained in:
parent
632eeddc64
commit
ee5e17c3e0
14 changed files with 430 additions and 179 deletions
17
scenes/Main/main.gd
Normal file
17
scenes/Main/main.gd
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
extends Node
|
||||
|
||||
@onready var gameTimer = $GameTimer
|
||||
@onready var scoreLabel = $Camera2D/CanvasLayer/Control/HBoxContainer/ScoreValue
|
||||
@onready var timeLabel = $Camera2D/CanvasLayer/Control/HBoxContainer2/TimeValue
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
pass # Replace with function body.
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
scoreLabel.text = str(GLOBAL.points)
|
||||
timeLabel.text = str(GLOBAL.time)
|
||||
|
||||
func _on_game_timer_timeout() -> void:
|
||||
GLOBAL.time += 1
|
||||
gameTimer.start(1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue