extends CharacterBody2D @onready var component_collision: ComponentCollision = $Collision @onready var component_movement: ComponentMovement = $Movement @onready var component_health: ComponentHealth = $Health func _ready(): add_to_group("enemies") component_collision.init() component_collision.collision_area.set_collision_mask_value(Utilities.Collision.Layer.EXPLOSION, false) $AnimatedSprite2D.play("spawn") $AnimatedSprite2D.stop() $AnimatedSprite2D.set_frame_and_progress(0, 0) #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.init() $Detection.set_collision_mask_value(Utilities.Collision.Layer.PLAYER, false)