Example #1
0
 private void DestroyStillBtns()
 {
     for (int i = 0; i < hearts.Count; i++)
     {
         hearts[i].Destroy2dBtn();
     }
     pauseBtn.Destroy2dBtn();
     UpdateList();
 }
Example #2
0
 private void ActionOnPauseBtn(string action = "")
 {
     //had to include this one here !Settings.ISPAUSE bz due to fade time will change it
     //back to false and then will disapper the pause menu and the still btns will not be back
     if ((!Settings.ISPAUSED && action == "") || (!Settings.ISPAUSED && action == "Pause"))
     {
         float tempSpeed = 150f;
         Settings.ISPAUSED = Settings.MecanicSwitcher(Settings.ISPAUSED);
         DestroyStillBtns();
         SpawnSetMenu("Pause_Menu_Spawner", tempSpeed);
         pauseBackGround = CreateStillBtn(Root.backGroundLabelPauseMenu, camChild[amountOfCamBtnSlots + 4]);
         pauseBackGround.FadeSpeedProp = tempSpeed;
     }
     else if ((Settings.ISPAUSED && action == "") || (Settings.ISPAUSED && action == "Resume"))
     {
         Settings.ISPAUSED = Settings.MecanicSwitcher(Settings.ISPAUSED);
         FireUpGUIButtons();
         CloseCurrentMenu();
         pauseBackGround.Destroy2dBtn();
     }
 }