示例#1
0
 //Get the height below the given vector
 public float GetLandingHeight(Vector3 playerPos)
 {
     return(Interpolation.CircularIn(GetAirborneDelta(playerPos)) * m_XScale);
 }
示例#2
0
    /// <summary>
    /// The initial flying animation across the screen.
    /// </summary>
    IEnumerator FlyAcrossAnimation()
    {
        yield return(new WaitForSeconds(m_DelayStart));

        while (m_currentTime < m_FlyingAcrossTimeToReachPosition)
        {
            transform.position = Vector3.LerpUnclamped(m_desiredPos + m_offset, m_desiredPos, Interpolation.CircularIn(m_currentTime / m_FlyingAcrossTimeToReachPosition));
            m_currentTime     += Time.deltaTime;
            yield return(null);
        }

        transform.position = m_desiredPos;
        m_currentTime      = 0.0f;

        SetShipToNewLocation();
    }
示例#3
0
 //Set the angle of the pipe to below the player when they are airborne
 //While airborne, the circular movement mod does not apply
 public void SetAngleToAirbornePos(Vector3 playerPos)
 {
     m_CurrentAngle = Mathf.Lerp(0, 90, Interpolation.CircularIn(GetAirborneDelta(playerPos)));
 }