diff --git a/Objects/ScrollingObjects/Loop.gd b/Objects/ScrollingObjects/Loop.gd index 37a8488..12cb589 100644 --- a/Objects/ScrollingObjects/Loop.gd +++ b/Objects/ScrollingObjects/Loop.gd @@ -15,6 +15,7 @@ func _ready(): func _on_Loop_body_entered(body): emit_signal("picked_up") body.loops_collected += 1 + body.get_node("Donut").self_modulate = $Sprite.self_modulate $AnimationPlayer.play("pop fade out") diff --git a/Objects/SpecialObjects/Player.gd b/Objects/SpecialObjects/Player.gd index ee02772..7ca4d0d 100644 --- a/Objects/SpecialObjects/Player.gd +++ b/Objects/SpecialObjects/Player.gd @@ -2,6 +2,9 @@ extends KinematicBody2D class_name Player +var rng = RandomNumberGenerator.new() + + export(Vector2) var gravity: Vector2 = Vector2(0, 10) export(float) var move_speed: float = 300 export(float) var jump_speed: float = 425 @@ -24,6 +27,9 @@ func get_floor(): return collision.collider +func _ready(): + $Donut.self_modulate = Color.from_hsv(rng.randf_range(0.0, 1.0), 0.4, 1) + func up_normal(): return -gravity.normalized() diff --git a/Sprites/Gatto/loop_alto.png b/Sprites/Gatto/loop_alto.png index ad92944..b2095b4 100644 Binary files a/Sprites/Gatto/loop_alto.png and b/Sprites/Gatto/loop_alto.png differ diff --git a/Sprites/Gatto/loop_basso.png b/Sprites/Gatto/loop_basso.png index b304551..c388c5c 100644 Binary files a/Sprites/Gatto/loop_basso.png and b/Sprites/Gatto/loop_basso.png differ diff --git a/Sprites/Gatto/loop_centro.png b/Sprites/Gatto/loop_centro.png index 315375c..aca2e36 100644 Binary files a/Sprites/Gatto/loop_centro.png and b/Sprites/Gatto/loop_centro.png differ