Example #1
0
 public void TogglePause(bool esc)
 {
     if (currentState == GameState.Normal)
     {
         Time.timeScale = 0;
         uiManager.pasueMenu.SetActive(true);
         currentState = GameState.Pause;
     }
     else
     {
         if (currentState == GameState.Pause)
         {
             Time.timeScale = 1;
             uiManager.pasueMenu.SetActive(false);
             currentState = GameState.Normal;
         }
     }
     if (esc)
     {
         pauseButtonSwitcher.SwitchSprite();
     }
 }
Example #2
0
 void FixedUpdate()
 {
     if (GameManager.instance.gameState == GameManager.GAME_STATE.PLAYING)
     {
         if (rb2d.velocity.y < 15)
         {
             //bc2d.enabled = true;
             sprSwitch.SwitchSprite(1);
             gotPowers = false;
             springed  = false;
         }
     }
 }