Files
gamedevjs-jam/collectables/Apple.gd
Indrajith K L aef3961512 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
2022-04-14 16:36:24 +05:30

15 lines
245 B
GDScript

extends Node2D
export var health=10
func _ready():
$AnimationPlayer.play("idle")
func _on_Area2D_body_entered(body):
if (body.name=="Player"):
body.health += health
self.hide()
$pickup.play()
func _on_pickup_finished():
queue_free()