// Use this for initialization
 void Start()
 {
     gameCtrl           = gameController.GetComponent <GameCtrl> ();
     thePlayer          = GameObject.FindWithTag("Player");
     playerController   = thePlayer.GetComponent <PlayerController> ();
     guiEnventFunctions = uiFunctions.GetComponent <GUIEventFunctions> ();
 }
Пример #2
0
    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> ();
        //***********************************************************************
    }
Пример #3
0
 void Awake()
 {
     //Reference the GUI functions.
     guiEventFunctions = GameObject.FindWithTag("UI").GetComponent <GUIEventFunctions> ();
 }