From ea8753a536eb1899a7e5808d1bbc4ddabf47cbac Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 5 Oct 2020 16:44:38 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=A9=20Add=20colored=20loop=20to=20the?= =?UTF-8?q?=20cat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Cookie <58516648+Cookie-CHR@users.noreply.github.com> --- Objects/ScrollingObjects/Loop.gd | 1 + Objects/SpecialObjects/Player.gd | 6 ++++++ Sprites/Gatto/loop_alto.png | Bin 852 -> 129 bytes Sprites/Gatto/loop_basso.png | Bin 758 -> 129 bytes Sprites/Gatto/loop_centro.png | Bin 741 -> 129 bytes 5 files changed, 7 insertions(+) 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 ad929444854df86977311a692ad80c119f315226..b2095b409421084bbcac0a57768e60cc179b72ac 100644 GIT bin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