Initial Commit
* Basic Character Controls * Tileset * Collision * Basic Collectables
This commit is contained in:
11
collectables/Apple.gd
Normal file
11
collectables/Apple.gd
Normal file
@@ -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()
|
||||
Reference in New Issue
Block a user