private void LevelFailure() { levelLoseClip.Play(); PopupPanel.PopupHandlerDelegate delegateMethod = LevelFailurePopupPressed; uiManager.ShowLevelFailure(delegateMethod); }
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); } }
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(); }
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(); }
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(); }
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(); }
private void NextLevel() { currentLevelNum++; // Check for all levels completed if (!levelLoader.LevelExistsAtIndex(currentLevelNum)) { PopupPanel.PopupHandlerDelegate delegateMethod = GameCompletePopupPressed; uiManager.ShowGameComplete(delegateMethod); } else { PrepareLevel(currentLevelNum); } }
private void LevelSuccess() { PopupPanel.PopupHandlerDelegate delegateMethod = LevelSuccessPopupPressed; uiManager.ShowLevelSuccess(delegateMethod); }