Esempio n. 1
0
 private void initGameManager()
 {
     inGame              = false;
     gameManagerScript   = this.GetComponent <GameManagerScript>();
     heightManagerScript = this.GetComponent <HeightManagerScript>();
     DontDestroyOnLoad(this.transform.gameObject);
 }
Esempio n. 2
0
 void Start()
 {
     depthText           = depthTextObj.GetComponent <Text>();
     depthText.text      = "0" + getUnit();
     heightManagerScript = GameManagerScript.getGameManagerScript().getHeightManager();
     StartCoroutine(updateText());
 }
Esempio n. 3
0
    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");
    }