Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        Debug.Log("Score: " + score);
        damageMulit = GameObject.Find("Score").GetComponent <ScoreDisplay> ().damageValue;
        if (direction == "North" || direction == "East")
        {
            goalDistance = goalValuePlus;
        }
        else
        {
            goalDistance = goalValueMinus;
        }

        if (score <= 0)
        {
            if (!ending)
            {
                ending = true;
                FadeEffect fe = GameObject.Find("Veil").GetComponent <FadeEffect> ();
                fe.nextScene = 3;
                fe.active    = true;
                StartCoroutine(fe.fadeOut());
            }
        }
    }
Exemplo n.º 2
0
 //check end goal
 //check your position
 void loadEnding()
 {
     StartCoroutine(fader.fadeOut());
     ending = true;
 }