Example #1
0
    IEnumerator Splash()
    {
        yield return(new WaitForSeconds(secondsToWait));

        CameraFade.StartAlphaFade(Preferences.BgColor(), false, 2f, 0f, () => {
            SceneManager.LoadScene(nextLevel);
        });
    }
Example #2
0
    public void FinishGame()
    {
        Time.timeScale = 1;
        GetComponent <FallRoutine>().StopAllCoroutines();
        GetComponent <InputCtrl>().paused     = true;
        GetComponent <FallRoutine>().enabled  = false;
        GetComponent <PieceFactory>().enabled = false;
        CurrentPiece().enabled = false;

        CameraFade.StartAlphaFade(Preferences.BgColor(), false, 2f, 0f, () => {
            SceneManager.LoadScene("mainMenu");
        });
    }
Example #3
0
 // Use this for initialization
 void Start()
 {
     CameraFade.StartAlphaFade(Preferences.BgColor(), true, 0.5f);
 }
Example #4
0
 public void BtnNewGame()
 {
     CameraFade.StartAlphaFade(Preferences.BgColor(), false, 0.5f, 0f, () => {
         SceneManager.LoadScene("game");
     });
 }