Exemple #1
0
        void Awake()
        {
            timerText = GetComponent <Text>();
            masterControllerScript = (MasterController)GameObject.Find("MasterController").GetComponent("MasterController");
            gameManagerScript      = (GameManager)GameObject.Find("GameManager").GetComponent("GameManager");

            // Set up the inital time
            //gameManagerScript.curTime = gameManagerScript.maxTime;
        }
Exemple #2
0
 // Make sure to call this function first thing in StartGame() or Awake() or Start()
 // A reference to the GameManager and its variables is stored here along with the MasterController
 protected void Initialize()
 {
     gameManagerScript      = (GameManager)GameObject.Find("GameManager").GetComponent("GameManager");
     masterControllerScript = (MasterController)GameObject.Find("MasterController").GetComponent("MasterController");
 }