Esempio n. 1
0
 IEnumerator Timer()
 {
     while (enabled)
     {
         curAR = ISMath.Random(attackRange);
         curSD = ISMath.Random(stoppingDistance);
         curSD = Mathf.Min(curAR, curSD);
         SearchEnemy();
         yield return(new WaitForSeconds(coreTimerInterval));
     }
 }
Esempio n. 2
0
    IEnumerator Timer()
    {
        while (enabled)
        {
            currentStopDistance   = ISMath.Random(stopRange);
            currentAttackDistance = ISMath.Random(attackRange);
            currentStopDistance   = Mathf.Min(currentStopDistance, currentAttackDistance);

            SearchEnemy();
            yield return(new WaitForSeconds(coreTimer));
        }
    }
Esempio n. 3
0
    IEnumerator RandomTimer()
    {
        while (enabled) // If the Box Collider is selected;
        {
            this.currentAttackRange      = ISMath.Random(this.attackRange);
            this.currentStoppingDistance = ISMath.Random(this.stoppingDistance);
            this.currentStoppingDistance = Mathf.Min(currentAttackRange, currentStoppingDistance);

            SearchEnemy();
            yield return(new WaitForSeconds(this.RandomTimerInterval));
        }
    }