//POWERUPS NOT CURRENTLY IMPLEMENTED //public void TogglePowerUps() //Used by controller //{ // powerUpsToggle.isOn = !powerUpsToggle.isOn; //} //public void ButtonTogglePowerUps() //Used by controller and mouse //{ // PlayerPrefs.SetInt("PowerUps", (PlayerPrefs.GetInt("PowerUps", 1) == 1 ? 0 : 1)); //} //Settings Panel Toggle(Universal for all players, but only player who opened can used settings) public void ToggleSettings() { //USED FOR MULTIPLE SETTINGS BUTTONS FOR MULTIPLE PLAYERS //currentSettingsPlayerNum = playerNum; //Settings for main player settingsPanel.SetActive(!settingsPanel.activeSelf); SettingsPanelScript sp = settingsPanel.GetComponent <SettingsPanelScript>(); sp.AIText.sprite = Resources.Load <Sprite>("LobbyUI/" + Utilities.CountTotalAI()); foreach (CharacterPanel c in charPanels) { if (c.AIPanel) { c.AIPanel.transform.GetChild(0).gameObject.SetActive(!settingsPanel.activeSelf); } c.gameObject.SetActive(!settingsPanel.activeSelf); c.TogglePlayer(!settingsPanel.activeSelf); c.ToggleRock(!settingsPanel.activeSelf); } //Set AI Panels when settings panel is turned off if (!settingsPanel.activeSelf) { int tot = ResetAI(); SetupAllAI(tot); // foreach (CharacterPanel c in ReadyToToggleAIPanels.Keys) { // c.ToggleAIPanel(ReadyToToggleAIPanels[c]); // } // ReadyToToggleAIPanels.Clear(); } }
void Start() { instance = this; playerNameImage.sprite = Resources.Load <Sprite>("LobbyUI/Player-" + CharacterJoinController.instance.currentSettingsPlayerNum); }