diff options
author | Indrajith K L | 2022-04-14 03:16:45 +0530 |
---|---|---|
committer | Indrajith K L | 2022-04-14 03:16:45 +0530 |
commit | fc44ae1243e21179d759df3b947fc55ca0425534 (patch) | |
tree | 588afc653da04ca4a71ab8d744d900c6c6f76b6e /collectables/Apple.gd | |
download | gamedevjs-jam-fc44ae1243e21179d759df3b947fc55ca0425534.tar.gz gamedevjs-jam-fc44ae1243e21179d759df3b947fc55ca0425534.tar.bz2 gamedevjs-jam-fc44ae1243e21179d759df3b947fc55ca0425534.zip |
Initial Commit
* Basic Character Controls
* Tileset
* Collision
* Basic Collectables
Diffstat (limited to 'collectables/Apple.gd')
-rw-r--r-- | collectables/Apple.gd | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/collectables/Apple.gd b/collectables/Apple.gd new file mode 100644 index 0000000..909eaf2 --- /dev/null +++ b/collectables/Apple.gd @@ -0,0 +1,11 @@ +extends Node2D + +export var health=10 +func _ready(): + $AnimationPlayer.play("idle") + + +func _on_Area2D_body_entered(body): + if body.entity_type=="PLAYER": + body.health += health + queue_free() |