summaryrefslogtreecommitdiff
path: root/Scenes/Entities/Enemies/Tree.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-05-23 14:11:43 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-05-23 14:11:43 +0200
commit06647b11ee163bc40daf454d87e1fcae563c3ced (patch)
tree866823ed79fa1c3bbdcb8b0be417f028f0c92d9b /Scenes/Entities/Enemies/Tree.gd
parent276b7664bd4a475a3ca93a682c16b49c504c58f7 (diff)
update
Diffstat (limited to 'Scenes/Entities/Enemies/Tree.gd')
-rw-r--r--Scenes/Entities/Enemies/Tree.gd5
1 files changed, 5 insertions, 0 deletions
diff --git a/Scenes/Entities/Enemies/Tree.gd b/Scenes/Entities/Enemies/Tree.gd
index 5572e02..bbd02a9 100644
--- a/Scenes/Entities/Enemies/Tree.gd
+++ b/Scenes/Entities/Enemies/Tree.gd
@@ -3,6 +3,7 @@ extends CharacterBody2D
@onready var component_collision: ComponentCollision = $Collision
@onready var component_movement: ComponentMovement = $Movement
+@onready var component_health: ComponentHealth = $Health
func _ready():
@@ -16,6 +17,10 @@ func _ready():
$AnimatedSprite2D.play("spawn")
$AnimatedSprite2D.stop()
$AnimatedSprite2D.set_frame_and_progress(0, 0)
+
+ $Health.connect("died", func():
+ $Detection.set_collision_mask_value(Utilities.Collision.Layer.PLAYER, false)
+ )
func _physics_process(delta):