in-game UI, plus refine boost logic

This commit is contained in:
D L 2023-01-30 00:02:47 -08:00
parent ed6def77f5
commit b5da1cf566
14 changed files with 3214 additions and 18 deletions

View file

@ -5,7 +5,7 @@ class_name DownhillAutoscrollerPlayer
export var min_speed : float = 3
export var max_speed : float = 11
export var player_initiated_acceleration : float = 5
export var boost_per_second : float = 6
export var boost_per_second : float = 6 / 1.36 # 6 mph
var last_contacted_map_elem_type : int = Constants.MapElemType.SQUARE
@ -201,7 +201,10 @@ func landed():
boost = 0
spin_audiostream_player.stop()
return
target_move_speed += boost
if boost > 0:
scene.find_node("CanvasLayer").flash_boost = true
h_speed += boost
target_move_speed = h_speed
boost = 0
func react(delta):