using Godot;
using System;
using Cirno.Scripts;
using Godot.Collections;

public partial class Camera : Enemy
{
    private AnimatedSprite2D _sprite;
    
    private AlarmManager _alarmManager;
    
    [Export] public Array<Node2D> AlarmActivationTargets { get; private set; }
    
    ///private AlarmManager _alarmManager;

    public override void _Ready()
    {
        base._Ready();
        
        _alarmManager = GetNode<AlarmManager>("/root/GameScene/AlarmManager");

        //_alarmManager = _gameManager.AlarmManager;
        
        _sprite = GetNode<AnimatedSprite2D>("AnimatedSprite2D");

        _sprite.Play("default");
        _sprite.SpeedScale = 0;
    }

    protected override void Shoot()
    {
        _alarmManager.SoundAlarm(this.GlobalPosition);
    }

}
