// Start is called before the first frame update
 void Start()
 {
     meleeTargets = GetComponent <MeleeTargets>();
     health       = GetComponent <HealthSystem>();
     status       = GetComponent <PlayerStatus>();
     sounds       = GetComponents <AudioSource>();
 }
Exemplo n.º 2
0
    void Start()
    {
        animator     = GetComponent <EnemyAnimation>();
        meleeTargets = GetComponent <MeleeTargets>();
        status       = GetComponent <EnemyStatus>();

        attackTimer           = new System.Timers.Timer(1000);
        attackTimer.Elapsed  += ResetAttack;
        attackTimer.AutoReset = true;
        attackTimer.Enabled   = false;
        attackInCooldown      = false;
    }
Exemplo n.º 3
0
    bool CanAttack()
    {
        MeleeTargets meleeTargets = GetComponent <MeleeTargets>();

        return(meleeTargets.Targets.Count > 0);
    }
Exemplo n.º 4
0
 void Start()
 {
     meleeTargets = GetComponentInParent <MeleeTargets>();
 }