Beispiel #1
0
 public void CheckPlayerPosition(Vector3 playerPos, Vector3 enemyPos, EnemiesStates states, EnemyBasic enemy, float minDistToAwake, float minDistToChase)
 {
     if (Vector3.Distance(playerPos, enemyPos) > minDistToAwake)
     {
         enemy.ChangeState(states.asleep);
     }
     else if (Vector3.Distance(playerPos, enemyPos) >= minDistToChase)
     {
         enemy.ChangeState(states.patrolling);
     }
 }
Beispiel #2
0
 public void CheckPlayerPosition(Vector3 playerPos, Vector3 enemyPos, EnemiesStates states, EnemyBasic enemy, float minDistToAwake, float minDistToChase)
 {
 }