// Initialization void Awake() { optionsMenu = gameObject.GetComponent <GUIOptionsMenu> (); //as GUIOptionsMenu; unitChoice = gameObject.GetComponent <UnitChoice> (); //as UnitChoice; switchButton = gameObject.GetComponent <SwitchButton> (); //as SwitchButton; gameManager = gameObject.GetComponent <GameManager> (); }
void Awake() { Instance = this; PlayerControl = GameObject.Find("GameControl"); PlayerControlScript = PlayerControl.GetComponent <SwitchButton> (); GameControllerScript = PlayerControl.GetComponent <GameManager> (); CursorSelectionScript = PlayerControl.GetComponent <CursorSelection> (); actionOrderHandler = PlayerControl.GetComponent <TurnActionOrderHandler> (); }
void Awake() { Instance = this; UnitChoiceScript = this.GetComponent <UnitChoice> (); Player1Script = GameObject.Find("Player1(Clone)").GetComponent <Player> (); Player2Script = GameObject.Find("Player2(Clone)").GetComponent <Player> (); gameControllerScript = gameObject.GetComponent <GameManager> (); GameController = GameObject.Find("GameControl"); gridScript = (GameObject.Find("Grid Controller")).GetComponent <GridCS> (); }