Player Animation converted to Animation Tree

Level 1 Design
Door Mechanism
Core Gameplay Mechanism - In-Progress
This commit is contained in:
Indrajith K L
2022-04-18 01:21:58 +05:30
parent 31089507aa
commit 77b9080c3b
30 changed files with 433 additions and 177 deletions

View File

@@ -1,13 +1,16 @@
extends Node2D
export var health=10
var collected = false
func _ready():
$AnimationPlayer.play("idle")
func _on_Area2D_body_entered(body):
if (body.name=="Player"):
body.health += health
if (body.name=="Player" and !collected):
collected = true
SignalBus.emit_signal("on_apples_collected",1)
self.hide()
$Sprite/Area2D.set_collision_mask_bit(1,false)
$pickup.play()
func _on_pickup_finished():