Example #1
0
        /// <summary>
        /// 配置旋转
        /// </summary>
        void setupRotation(RuntimeCharacter.Direction d)
        {
            var rot = transform.localEulerAngles;

            rot.z = RuntimeCharacter.dir82Angle(d);
            transform.localEulerAngles = rot;
        }
Example #2
0
        /// <summary>
        /// 更新朝向
        /// </summary>
        void updateDirection()
        {
            if (!directionController)
            {
                return;
            }
            var rot = directionController.localEulerAngles;

            rot.z = RuntimeCharacter.dir82Angle(direction);
            directionController.localEulerAngles = rot;
        }