Esempio n. 1
0
 void Update()
 {
     if (!started)           //Only executed once
     {
         started = true;
         //Uses the instance of screenCreditsController to call a method to set a starter boolean
         screenCreditsController.StartCreditsImages();
     }
 }
Esempio n. 2
0
    //Similar to fade in, but decreases the intensity until 0
    IEnumerator FadeOutHeavenLight(Light heavenLight)
    {
        //Also, removes the walls and azazel, giving place only for the credits screen
        objectsToRemove = GameObject.FindGameObjectsWithTag("Respawn");
        foreach (GameObject visible in objectsToRemove)
        {
            visible.GetComponent <MeshRenderer> ().enabled = false;
        }

        //Removing Azazel
        GameObject.FindGameObjectWithTag("Demon").GetComponent <SkinnedMeshRenderer> ().enabled = false;

        //Decreases light intensity
        while (heavenLight.intensity > 0.0f)
        {
            heavenLight.intensity -= Time.deltaTime;
            yield return(null);
        }

        //Uses instance of credits controller to start credits images
        screenCreditsController.StartCreditsImages();
    }