title: Pausing Unity game without "Time.timeScale = 0"
body: <p>I'm trying to find a way to pause my game in Unity without using "Time.timeScale = 0;". The reason I want to change this is that I want to make the character play an animation while the game is paused. Is there a way to change this script so that the gravity and forward speed only "sets in" after the player have clicked space? Or is there a better way to solve the problem?</p>
  
  <p>This is the script:</p>
  
  <pre><code>public class PlayerMove : MonoBehaviour {
  
      Vector3 velocity = Vector3.zero;
      public Vector3 gravity;
      public Vector3 FlyVelocity;
      public float maxSpeed = 5f;
      public float forwardSpeed = 1f; 
  
      bool didFly = false;
      bool dead = false;
      float deathCooldown;
      Animator animator;
  
      // Use this for initialization
      void Start () {
          animator = GetComponentInChildren&lt;Animator&gt;();
      }
  
      // Do Graphic &amp; Input updates here
      void Update(){
          if (dead) {
              deathCooldown -= Time.deltaTime;
  
              if (deathCooldown &lt;= 0) {
                  if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButtonDown(0) ) {
                  Application.LoadLevel( Application.loadedLevel );
                      }
                  }
              }
          if (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButtonDown(0) ) {
              didFly = true;
              animator.SetTrigger ("DoFly");
          }
      }
  
      void OnCollisionEnter2D(Collision2D collision) {
          animator.SetTrigger ("Death");
          dead = true;
      }
  
      // Do physics engine updates here
      void FixedUpdate () {
          if (dead)
              return;
  
          velocity += gravity * Time.deltaTime;
          velocity.x = forwardSpeed;
  
          if(didFly == true) {
              didFly = false;
              velocity += FlyVelocity;
          }
  
          velocity = Vector3.ClampMagnitude(velocity, maxSpeed);
  
          transform.position += velocity * Time.deltaTime;
  
          deathCooldown = 0.5f;
      }
  }
  </code></pre>