Exemplo n.º 1
0
    void Awake()           //initialize variables from other scripts and objects
    {
        paused    = false; //game not paused and pause menu not visible
        pauseMenu = GameObject.Find("PauseMenu");
        pauseMenu.SetActive(paused);

        oxyTracker       = GameObject.Find("OxygenTracker");  //get object and component
        oxyTrackerScript = oxyTracker.GetComponent <OxygenTrackerScript> ();
        oxyTrackerScript.resetOxygen();                       //set oxygen to inital oxygen

        terrScript = terrain.GetComponent <TerrainScript> (); //get terrain
        StartCoroutine(beginGame());                          //start coroutine that sets the game area up properly
    }
Exemplo n.º 2
0
 public void HitOxygenTank()      //called on collision with Oxygen tank
 {
     oxyTrackerScript.resetOxygen();
 }