/// <summary> /// define all the variables /// </summary> private void Start() { this.getInputCountry = int.MaxValue; this.currentPlayer = 0; this.currentStage = 3; this.forcesPanel = GameObject.Find("forcesPanel"); //set the panels this.startPanel = GameObject.Find("StartPanel"); if (this.startPanel != null) { this.startPanel.SetActive(false); } this.AttackPanel = GameObject.Find("AttackPanel"); if (this.AttackPanel != null) { this.AttackPanel.SetActive(false); } this.ReiPanel = GameObject.Find("ReinforcementPanel"); if (this.ReiPanel != null) { this.ReiPanel.SetActive(false); } this.MovePanel = GameObject.Find("MovingPanel"); if (this.MovePanel != null) { this.MovePanel.SetActive(false); } this.WPanel = GameObject.Find("WinPanel"); if (this.WPanel != null) { this.WPanel.SetActive(false); } this.st = null; this.rei = null; this.sm = null; this.at = null; this.mo = null; this.bot = null; }
private void getWhoBot() { for (int i = 2; i <= this.numOfActivePlayer; i++) { string stringTog = "ToggleP" + i; if (this.forcesPanel.transform.Find(stringTog) != null) { this.playerAi[i - 1] = this.forcesPanel.transform.Find(stringTog).GetComponent <Toggle>().isOn; } } if (this.forcesPanel != null) { this.forcesPanel.SetActive(false); } if (this.startPanel != null) { this.startPanel.SetActive(true); } this.sm = new SecretMissions(this.numOfActivePlayer, Global.map); this.st = new Start_Game(this.numOfActivePlayer, Global.map); }