mirror of
https://github.com/Steffo99/cinnos.git
synced 2024-11-21 15:44:21 +00:00
DONE
This commit is contained in:
parent
fd0db1476b
commit
e2c400ee9e
3 changed files with 400 additions and 11 deletions
11
GameTimer.gd
11
GameTimer.gd
|
@ -3,10 +3,17 @@ class_name GameTimer
|
||||||
|
|
||||||
|
|
||||||
var current_time := 0.0
|
var current_time := 0.0
|
||||||
|
var stopped: bool = false
|
||||||
|
|
||||||
@onready var parent: Label = get_parent()
|
@onready var parent: Label = get_parent()
|
||||||
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
current_time += delta
|
if not stopped:
|
||||||
parent.text = "%0.2f" % current_time
|
current_time += delta
|
||||||
|
parent.text = "%0.2f" % current_time
|
||||||
|
|
||||||
|
|
||||||
|
func _on_dialog_6_body_entered(body):
|
||||||
|
if body is Player:
|
||||||
|
stopped = true
|
||||||
|
|
|
@ -30,6 +30,9 @@ func on_banana():
|
||||||
|
|
||||||
|
|
||||||
func _physics_process(delta):
|
func _physics_process(delta):
|
||||||
|
velocity.x *= friction
|
||||||
|
velocity.z *= friction
|
||||||
|
|
||||||
# Refilla salto
|
# Refilla salto
|
||||||
if is_on_floor():
|
if is_on_floor():
|
||||||
refill_jumps()
|
refill_jumps()
|
||||||
|
|
397
Root.tscn
397
Root.tscn
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue