title: Unity Easing over time should fire once
body: <p>I'm trying to create a function that rotates over a period of time,  I call it from a co-routine triggered by a button.  The Coroutine executes fine, the only issue is that you can fire it multiple times. </p>
  
  <pre><code>protected bool _isRotating = false;
  public IEnumerator RotateWithEasing(GameHelper.Axis axis, float inTime)
  {
      _isRotating = true;
      if(_isRotating)
      {
          yield return null;
      }
  
      var degrees = this.GetDegreesFromAxis(axis);
  
      Quaternion fromAngle = transform.rotation;
      Quaternion toAngle = Quaternion.Euler(transform.eulerAngles + degrees);
      for (float t = 0f; t &lt; 1f; t += Time.deltaTime / inTime)
      {
          transform.rotation = Quaternion.Lerp(fromAngle, toAngle, t);
          yield return null;
      }
  
      _isRotating = false;
  }
  </code></pre>
  
  <p>How can I have this fire once and not register to fire again until after the rotation is complete?</p>