From aef396151234aa21af4a658ea11f03ea9434961c Mon Sep 17 00:00:00 2001 From: Indrajith K L Date: Thu, 14 Apr 2022 16:36:24 +0530 Subject: Graphics and SFX Changes * Adds Background parallax images (not exactly parallax since we have a fixed camera) * Adds SFX * Fixes Pickable collisions and SFX playback --- collectables/Apple.gd | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'collectables/Apple.gd') diff --git a/collectables/Apple.gd b/collectables/Apple.gd index e95ef61..abf0db3 100644 --- a/collectables/Apple.gd +++ b/collectables/Apple.gd @@ -4,8 +4,11 @@ export var health=10 func _ready(): $AnimationPlayer.play("idle") - func _on_Area2D_body_entered(body): if (body.name=="Player"): body.health += health - queue_free() + self.hide() + $pickup.play() + +func _on_pickup_finished(): + queue_free() -- cgit v1.2.3