示例#1
0
        private FRotator AsRotator(RotatorType type)
        {
            _reader.Reset();

            FRotator rotator = null;

            switch (type)
            {
            case RotatorType.Byte:
                rotator = _reader.ReadRotation();
                break;

            case RotatorType.Short:
                rotator = _reader.ReadRotationShort();
                break;
            }


            if (_reader.IsError || !_reader.AtEnd())
            {
                return(null);
            }

            return(rotator);
        }
示例#2
0
        private FRotator AsRotator(RotatorType type)
        {
            _reader.Reset();

            FRotator rotator = type switch
            {
                RotatorType.Byte => _reader.ReadRotation(),
                RotatorType.Short => _reader.ReadRotationShort(),
                _ => null
            };

            if (_reader.IsError || !_reader.AtEnd())
            {
                return(null);
            }

            return(rotator);
        }