private IEnumerator CameraMotionDelay()
    {
        Animator cameraAnimator = GameObject.Find("CameraParent").GetComponent <Animator>();

        cameraAnimator.SetTrigger("startCameraMotion");
        menuScreen.Deactivate();
        yield return(new WaitForSeconds(4f));

        StartGame();
    }
Exemple #2
0
    IEnumerator _FadeToScene(int scene)
    {
        scrnLast.Deactivate();
        scrnLast = null;

        fade.color = Color.clear;
        while (fade.color.a < 0.1f)
        {
            fade.color += new Color(0, 0, 0, .0015f);
            yield return(null);
        }
        while (fade.color.a < 1)
        {
            fade.color += new Color(0, 0, 0, .1f);
            yield return(null);
        }
        fade.color = Color.black;

        yield return(waitTransition);

        Application.LoadLevel(scene);
    }
    public void StartGame()
    {
        deadPlayerCount = 0;
        gameState       = GameState.Playing;
        menuScreen.Deactivate();
        restartScreen.Deactivate();

        //AkSoundEngine.Postevent("Restart", gameobject);
        print("Sound effect: Restart");
        foreach (Player player in players)
        {
            player.Revive();
        }

        Rocket.instance.Initialize();
    }