// Use this for initialization void Start() { gameCtrl = gameController.GetComponent <GameCtrl> (); thePlayer = GameObject.FindWithTag("Player"); playerController = thePlayer.GetComponent <PlayerController> (); guiEnventFunctions = uiFunctions.GetComponent <GUIEventFunctions> (); }
void Awake() { //Set Reference to the GUIEventFunctions class ********************************** uiFunctions = GameObject.FindWithTag("UI"); guiEventFunctions = uiFunctions.GetComponent <GUIEventFunctions> (); //******************************************************************************* //Set Reference to the gameCtrl class *********************************** gameController = GameObject.FindWithTag("GameController"); gameCtrl = gameController.GetComponent <GameCtrl> (); //*********************************************************************** }
void Awake() { //Reference the GUI functions. guiEventFunctions = GameObject.FindWithTag("UI").GetComponent <GUIEventFunctions> (); }