using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Archer : Ally
{

    public override void Start() 
    {
        base.Start();
    }

    public override void Update() 
    {
        base.Update();
        if (IsEnemyDetected && Enemy.Hp > 0) {
            AttackEnemy();
        }

    }

    void AttackEnemy() 
    {

        //Attack Cooldown
            if(AttackInterval < AttackSpeedWait) {

                Animation.PlayAttackAnim();

                

                AttackSpeedWait = 0f;
                
            }

            AttackSpeedWait += Time.deltaTime;
            
    }

}
