summaryrefslogtreecommitdiff
path: root/Scenes/Entities/Enemies/Tree.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-07-19 14:24:09 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-07-19 14:24:09 +0200
commit294f87adb4441ec25316601505ca1a7e97fa24c7 (patch)
treee48ed54e97f19ae5dd189ee42ddb73c4e995175f /Scenes/Entities/Enemies/Tree.gd
parent06647b11ee163bc40daf454d87e1fcae563c3ced (diff)
update
Diffstat (limited to 'Scenes/Entities/Enemies/Tree.gd')
-rw-r--r--Scenes/Entities/Enemies/Tree.gd16
1 files changed, 6 insertions, 10 deletions
diff --git a/Scenes/Entities/Enemies/Tree.gd b/Scenes/Entities/Enemies/Tree.gd
index bbd02a9..320640e 100644
--- a/Scenes/Entities/Enemies/Tree.gd
+++ b/Scenes/Entities/Enemies/Tree.gd
@@ -12,24 +12,20 @@ func _ready():
component_collision.init()
component_collision.collision_area.set_collision_mask_value(Utilities.Collision.Layer.EXPLOSION, false)
- component_movement.process_mode = Node.PROCESS_MODE_DISABLED
- set_physics_process(false)
$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):
- component_movement.physics_process(delta)
+#func _physics_process(delta):
+ #component_movement.physics_process(delta)
func _on_detection_body_entered(_body):
$AnimatedSprite2D.play("spawn")
await $AnimatedSprite2D.animation_finished
+
component_collision.collision_area.set_collision_mask_value(Utilities.Collision.Layer.EXPLOSION, true)
- component_movement.process_mode = Node.PROCESS_MODE_INHERIT
- set_physics_process(true)
+ component_movement.init()
+
+ $Detection.set_collision_mask_value(Utilities.Collision.Layer.PLAYER, false)