Added a HUD for both distance driven and current speed (in pixels and pixels/second respectively)

This commit is contained in:
KingGurke 2023-10-01 12:13:42 +02:00
parent 098033bbbf
commit 837408aaa3
5 changed files with 79 additions and 1 deletions

View file

@ -21,6 +21,8 @@ extends Node2D
## reference to the line node used to draw the finish line
@export var finish: Line2D
signal distance_changed(new_distance)
#variables
var width
var running = true
@ -79,6 +81,7 @@ func _process(delta):
print_debug("adding a lap")
lap_distance += path.curve.get_baked_length()
last_offset = offset
distance_changed.emit(get_total_distance())
# print_debug("player distance driven: ", get_total_distance(), " distance since last check: ", off_diff)