public void Retry()
    {
        // Let soomla know that a stage has ended
        if (Game.instance.currentState != GameState.GameOver)
        {
            SoomlaLevelUp.GetLevel(Constants.lvlup_level_main).End(false);
        }

        // Show and hide GUIs
        GUIGameOver.instance.Hide();
        GUIVictory.instance.Hide();
        GUIPause.instance.Hide();
        GUIPlayMode.instance.Show();
        GUITitleScreen.instance.Hide();

        // Load the Scene
        Application.LoadLevel("Game");

        // Update the state of the game
        Game.instance.currentState = GameState.ChasingPhase;
        Game.instance.InitializeStats();

        // Update SoomlaLevelUp State
        SoomlaLevelUp.GetLevel(Constants.lvlup_level_main).Start();
    }
Exemplo n.º 2
0
    public void Victory()
    {
        currentState = GameState.GameOver;

        SoomlaLevelUp.GetLevel(Constants.lvlup_level_main).End(true);

        GameData.rank += 1;
    }
Exemplo n.º 3
0
    public void GameOver()
    {
        currentState = GameState.GameOver;

        SoomlaLevelUp.GetLevel(Constants.lvlup_level_main).End(true);

        if (GameData.rank > 1)
        {
            GameData.rank -= 1;
        }
    }
    public void Play()
    {
        // Show and hide GUIs
        GUIGameOver.instance.Hide();
        GUIVictory.instance.Hide();
        GUIPause.instance.Hide();
        GUIPlayMode.instance.Show();
        GUITitleScreen.instance.Hide();

        // Load the scene
        Application.LoadLevel("Game");

        // Update the state of the game
        Game.instance.currentState = GameState.ChasingPhase;
        Game.instance.InitializeStats();

        // Update SoomlaLevelUp State
        SoomlaLevelUp.GetLevel(Constants.lvlup_level_main).Start();
    }
    public void Resume()
    {
        // Show and hide GUIs
        GUIGameOver.instance.Hide();
        GUIVictory.instance.Hide();
        GUIPause.instance.Hide();
        GUIPlayMode.instance.Show();
        GUITitleScreen.instance.Hide();

        // Update the state of the game
        Game.instance.currentState = GameState.ChasingPhase;

        // Set character states
        Character2D.instance.Resume();
        MonsterController.instance.Resume();

        // Update SoomlaLevelUp State
        SoomlaLevelUp.GetLevel(Constants.lvlup_level_main).Start();

        Time.timeScale = 1;
    }