Files
gamedevjs-jam/collectables/Apple.gd
Indrajith K L fc44ae1243 Initial Commit
* Basic Character Controls
* Tileset
* Collision
* Basic Collectables
2022-04-14 03:16:45 +05:30

12 lines
192 B
GDScript

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()