예제 #1
0
 /* Spawn AI if it's a normal level and set of panels
  */
 void SetMode()
 {
     Destroy(enemy);
     if (PlayerPrefs.GetInt("mode") == 0)
     {
         infinite = false;
         infiniteButtons[0].SetActive(true);
         infiniteButtons[1].SetActive(false);
         mg.GenLevel();
         enemy = Instantiate(enemyPref);
         enemy.transform.position = enemySpawn.transform.position;
     }
     else
     {
         infinite = true;
         infiniteButtons[0].SetActive(false);
         infiniteButtons[1].SetActive(true);
         mg.GenRandomLevel();
     }
 }