예제 #1
0
 void CheckBackButton()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         Time.timeScale = 0;            //TODO:: // SACAR ESTO A LA MIERDA
         _lvlCanvasManager.EnableMinionButtons(false);
         _lvlCanvasManager.EnableDisableMinionSkillButtons(false);
         var popup = GameManager.popupManager.BuildPopup(LevelCanvasManager.transform, "Pause", "Game paused", "Main Map", PopupsID.AcceptOrDecline);
         if (popup != null)
         {
             popup.AddFunction(BasePopup.FunctionTypes.ok, OnFinishLevelCallback);
         }
     }
 }
예제 #2
0
    void CheckBackButton()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            if (levelMode == LevelMode.Tutorial)
            {
                return;
            }

            var popup = GameManager.popupManager.BuildPopup(LevelCanvasManager.transform, "Pause", "Game paused", "Continue", "Main Map", PopupsID.AcceptOrDecline, true);
            if (popup != null)
            {
                Time.timeScale = 0;//TODO:: // SACAR ESTO A LA MIERDA
                _lvlCanvasManager.EnableMinionButtons(false);
                _lvlCanvasManager.EnableDisableMinionSkillButtons(false);

                popup.AddFunction(BasePopup.FunctionTypes.ok, OnResumePause);
                popup.AddFunction(BasePopup.FunctionTypes.cancel, OnFinishLevelCallback);
                popup.transform.localScale *= 1.7f;
            }
        }
    }