From 06647b11ee163bc40daf454d87e1fcae563c3ced Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Thu, 23 May 2024 14:11:43 +0200 Subject: update --- Scenes/Entities/Enemies/Tree.gd | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'Scenes/Entities/Enemies/Tree.gd') 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): -- cgit v1.2.3