Ejemplo n.º 1
0
    private void LevelFailure()
    {
        levelLoseClip.Play();

        PopupPanel.PopupHandlerDelegate delegateMethod = LevelFailurePopupPressed;
        uiManager.ShowLevelFailure(delegateMethod);
    }
Ejemplo n.º 2
0
    private void PrepareLevel(LevelData level, int levelNum, bool isRetry = false)
    {
        interactionEnabled = false;

        currentLevel = level;

        currentScore = 0;

        currentNumMovesMade = 0;

        uiManager.ResetForLevel(level);

        ResetChain();

        board.SetupLevel(level, this);

        if (isRetry)
        {
            StartLevel();
        }
        else
        {
            PopupPanel.PopupHandlerDelegate delegateMethod = LevelIntroPopupPressed;
            uiManager.ShowLevelIntro(level, levelNum, delegateMethod);
        }
    }
Ejemplo n.º 3
0
    public void ShowLevelFailure(PopupPanel.PopupHandlerDelegate delegateMethod)
    {
        string popupTitle   = "No Moves Left!";
        string popupMessage = "AAARGH!";
        string buttonText   = "Retry";

        levelOutroPopupPanel.Setup(popupTitle, popupMessage, buttonText, delegateMethod);
        levelOutroPopupPanel.Enable();
    }
Ejemplo n.º 4
0
    public void ShowLevelSuccess(PopupPanel.PopupHandlerDelegate delegateMethod)
    {
        string popupTitle   = "Level Complete!";
        string popupMessage = "ROAR!!!";
        string buttonText   = "Next Level";

        levelOutroPopupPanel.Setup(popupTitle, popupMessage, buttonText, delegateMethod);
        levelOutroPopupPanel.Enable();
    }
Ejemplo n.º 5
0
    public void ShowGameComplete(PopupPanel.PopupHandlerDelegate delegateMethod)
    {
        string popupTitle   = "Game Complete!";
        string popupMessage = "King of\nthe Jungle!";
        string buttonText   = "Restart";

        levelIntroPopupPanel.Setup(popupTitle, popupMessage, buttonText, delegateMethod);
        levelIntroPopupPanel.Enable();
    }
Ejemplo n.º 6
0
    public void ShowLevelIntro(LevelData level, int levelNum, PopupPanel.PopupHandlerDelegate delegateMethod)
    {
        string popupTitle   = "Level " + (levelNum + 1).ToString();
        string popupMessage = "Target: " + level.targetScore + "\nMoves: " + level.moves;
        string buttonText   = "Play";

        levelIntroPopupPanel.Setup(popupTitle, popupMessage, buttonText, delegateMethod);
        levelIntroPopupPanel.Enable();
    }
Ejemplo n.º 7
0
    private void NextLevel()
    {
        currentLevelNum++;

        // Check for all levels completed
        if (!levelLoader.LevelExistsAtIndex(currentLevelNum))
        {
            PopupPanel.PopupHandlerDelegate delegateMethod = GameCompletePopupPressed;
            uiManager.ShowGameComplete(delegateMethod);
        }
        else
        {
            PrepareLevel(currentLevelNum);
        }
    }
Ejemplo n.º 8
0
 private void LevelSuccess()
 {
     PopupPanel.PopupHandlerDelegate delegateMethod = LevelSuccessPopupPressed;
     uiManager.ShowLevelSuccess(delegateMethod);
 }