diff --git a/objects/hud/hud.gd b/objects/hud/hud.gd index 67fbd72..6dc1b2b 100644 --- a/objects/hud/hud.gd +++ b/objects/hud/hud.gd @@ -13,6 +13,8 @@ onready var lives_counter = $LivesCounter onready var high_counter = $HighCounter onready var time_counter = $TimeCounter +export (Color) var bonus_color + func _ready(): Game.time = 0 @@ -34,8 +36,18 @@ func _physics_process(delta): ##TOUCH UP LATER #Lives counter lives_counter.text = str(Game.lives) + #Life bonus color + if Game.lives == 2: + lives_counter.modulate = bonus_color + else: + lives_counter.modulate = Color.white #High counter high_counter.text = str("HIGH:") + str("%06d" % Game.high_score) ##Timer Game.time += delta time_counter.text = Game.timeify(Game.time) + #Time bonus counter + if (Game.has_collection_bonus() && Game.time <= Game.get_map().target_time_100) or (!Game.has_collection_bonus() && Game.time <= Game.get_map().target_time_any): + time_counter.modulate = bonus_color + else: + time_counter.modulate = Color.white diff --git a/objects/hud/hud.tscn b/objects/hud/hud.tscn index 34ea3b4..302d0a6 100644 --- a/objects/hud/hud.tscn +++ b/objects/hud/hud.tscn @@ -16,6 +16,7 @@ layer = 100 margin_top = 1.0 margin_bottom = 1.0 script = ExtResource( 6 ) +bonus_color = Color( 0.478431, 1, 0.47451, 1 ) [node name="Back" type="Sprite" parent="HUD"] position = Vector2( 128, 95 ) diff --git a/objects/player/player.tscn b/objects/player/player.tscn index 57143f7..a49d418 100644 --- a/objects/player/player.tscn +++ b/objects/player/player.tscn @@ -719,6 +719,7 @@ texture = ExtResource( 15 ) [node name="DustParticles" type="Particles2D" parent="."] position = Vector2( 0, 12 ) +z_index = 1 emitting = false amount = 5 lifetime = 0.3