Esempio n. 1
0
 void SetRandomDir()
 {
     if (currState != EnemyStates.WANDERING)
     {
         return;
     }
     currentDir = new Vector3(Random.Range(-1f, 1f), Random.Range(-1f, 1f), 0).normalized;
     Callbacks.AddFixed(SetRandomDir, randomDirDuration, gameObject);
 }
Esempio n. 2
0
 void CheckPlayerDist()
 {
     if (currState == EnemyStates.WANDERING)
     {
         Callbacks.AddFixed(CheckPlayerDist, 2f, gameObject);
         if (IsCloseToPlayer())
         {
             SendFriendSignal();
         }
     }
 }