示例#1
0
    void LateUpdate()
    {
        // handle physic animation after render update
        if (m_controlled && m_bPhysicAnim && m_controlled.GetPhysicAnim())
        {
            Vector2 curPhysicLocal = m_controlled.GetPhysicAnim().transform.localPosition;
            if (m_direction == Direction.Left)
            {
                curPhysicLocal.x = -curPhysicLocal.x;
            }

            curPhysicLocal.x += m_curExitPower;
            m_curGrabHandle   = m_initPhysicAnimPos + curPhysicLocal;
        }
    }