Ejemplo n.º 1
0
 void FadeIn()
 {
     if (screenFader != null)
     {
         screenFader.FadeFromBlack();
     }
 }
Ejemplo n.º 2
0
    private bool fadeToMenu = false; // tracks when the button has been clicked to fade to menu


    private void Start()
    {
        Cursor.visible   = true;
        Cursor.lockState = CursorLockMode.None;

        // grab screen fader
        screenFader = GameObject.FindWithTag("ScreenFader").GetComponent <ScreenFader>();

        // start fading from black
        screenFader.FadeFromBlack(1f);
    }
    public void SwitchLights(bool state)
    {
        ScreenFader fader = GetComponent <ScreenFader>();

        if (state)
        {
            fader.FadeFromBlack();
        }
        else
        {
            fader.FadeToBlack();
        }
    }
Ejemplo n.º 4
0
    private void Start()
    {
        if (player == null)
        {
            player = FindPlayerObject();
        }

        if (level == null)
        {
            level = FindLevelObject();
        }

        ScreenFader.FadeFromBlack();
        QueueLevel();
    }
    // Use this for initialization
    void Start()
    {
        screenFader = GameObject.FindWithTag("ScreenFader").GetComponent <ScreenFader>();

        screenFader.FadeFromBlack(1f);
    }
 private void FadeIntoGame()
 {
     screenFader.FadeFromBlack(0.01f);
 }