void Update()
    {
        #region Check for Lerp
        bool once = false;
        if (mPositionLerp.LerpIsActive())
        {
            Vector2 p = mPositionLerp.UpdateLerp();
            transform.position = new Vector3(p.x, p.y, transform.position.z);
            once = true;
        }

        if (mSizeLerp.LerpIsActive())
        {
            Vector2 p = mSizeLerp.UpdateLerp();
            mTheCamera.orthographicSize = p.x;
            once = true;
        }
        if (once)
        {
            UpdateWorldWindowBound();
        }
        #endregion

        #region Check for Shake
        if (!mShake.ShakeDone())
        {
            transform.position = mShake.UpdateShake();
        }
        #endregion
    }
示例#2
0
 private void Update()
 {
     if (!shakePosition.ShakeDone())
     {
         transform.position = shakePosition.UpdateShake();
     }
     else
     {
         if (shaking)
         {
             //Clears the waypoint
             variables.waypointCam.SetWaypoint(this, true);
             shaking = false;
         }
     }
 }