コード例 #1
0
        /// <summary>
        /// Do Euler physics each tick
        /// </summary>
        void Update()
        {
            CalcHorizontalMovement();

            CalcVerticalMovement();

            //applying our velocity to our position
            transform.position += velocity * Time.deltaTime;
            aabb.RecalcAABB();
            isGrounded = false;
        }
コード例 #2
0
        /// <summary>
        /// Do Euler physics each tick
        /// </summary>
        void Update()
        {
            if (Time.deltaTime > 0.25f)
            {
                return;                         // lag spike? quit early, do nothing
            }
            CalcHorizontalMovement();

            CalcVerticalMovement();

            //applying our velocity to our position
            transform.position += velocity * Time.deltaTime;
            aabb.RecalcAABB();
            isGrounded = false;
        }