private void initGameManager() { inGame = false; gameManagerScript = this.GetComponent <GameManagerScript>(); heightManagerScript = this.GetComponent <HeightManagerScript>(); DontDestroyOnLoad(this.transform.gameObject); }
void Start() { depthText = depthTextObj.GetComponent <Text>(); depthText.text = "0" + getUnit(); heightManagerScript = GameManagerScript.getGameManagerScript().getHeightManager(); StartCoroutine(updateText()); }
void Start() { lerpPercent = 0.0f; backgroundPosition = this.transform.position; float topScreen = Camera.main.GetComponent <ScaleWidthScript>().calculatedHeight / 2.0f; Util.fitObjectToWidth(this.gameObject); startPositionY = topScreen + startPositionY; endPositionY = topScreen + endPositionY; heightManagerScript = GameManagerScript.getGameManagerScript().getHeightManager(); StartCoroutine("lerpBackground"); }