// Use this for initialization
 void Start()
 {
     gameModeList = new List <GameMode>();
     for (int i = 0; i < modeNameList.Length; ++i)
     {
         gameModeList.Add(new GameMode(modeNameList[i], descriptionList[i], spriteList[i]));
     }
     gameModeLoop     = new UniqueLoop <GameMode>(gameModeList);
     selectedGameMode = gameModeLoop.GetNextItem(0);
     selectedGameMode = gameModeLoop.GetPreviousItem(0); // so that it always starts with the first item in the list
     UpdateUI();
 }
Exemple #2
0
 void Start()
 {
     instance = this;
     currentSettingsPlayerNum = 1;
     SetupReadyDict(maxPlayers);
     if (PlayerPrefs.GetInt("InfiniteLives") == 1)
     {
         ToggleInfiniteLives();
     }
     //ReadyToToggleAIPanels = new Dictionary<CharacterPanel, bool>();
     charPanels = new List <CharacterPanel>(FindObjectsOfType <CharacterPanel>());
     charPanels.Sort();
     colors = new Color[] { new Color(0.92f, 0.1f, 0.2f), Color.yellow, Color.cyan, Color.white, new Color(1f, 0.7f, 1f), new Color(1f, 0.56f, 0.1f),
                            new Color(0.62f, 0.92f, 0.16f), new Color(0.16f, 0.38f, 0.92f), new Color(0.62f, 0.92f, 0.16f) };
     uniqueLoop = new UniqueLoop <Color>(colors);
     PlayerPrefs.SetInt("NumberOfLives", defaultLives);
     //POWERUPS NOT IMPLEMENTED
     //if (powerUpsToggle) {
     //    powerUpsToggle.isOn = (PlayerPrefs.GetInt("PowerUps", 1) == 1 ? true : false);
     //}
 }