Esempio n. 1
0
        internal static W3dEmitterBlurTimeHeader Parse(BinaryReader reader)
        {
            var result = new W3dEmitterBlurTimeHeader
            {
                KeyframeCount = reader.ReadUInt32(),
                Random        = reader.ReadSingle()
            };

            reader.ReadBytes(sizeof(uint)); // Pad

            return(result);
        }
        internal static W3dEmitterBlurTimeKeyframes Parse(BinaryReader reader)
        {
            var result = new W3dEmitterBlurTimeKeyframes
            {
                Header = W3dEmitterBlurTimeHeader.Parse(reader)
            };

            result.Keyframes = new W3dEmitterBlurTimeKeyframe[result.Header.KeyframeCount + 1];
            for (var i = 0; i < result.Keyframes.Length; i++)
            {
                result.Keyframes[i] = W3dEmitterBlurTimeKeyframe.Parse(reader);
            }

            return(result);
        }
Esempio n. 3
0
        internal static W3dEmitterBlurTimeKeyframes Parse(BinaryReader reader, W3dParseContext context)
        {
            return(ParseChunk(reader, context, header =>
            {
                var result = new W3dEmitterBlurTimeKeyframes
                {
                    Header = W3dEmitterBlurTimeHeader.Parse(reader)
                };

                result.Keyframes = new W3dEmitterBlurTimeKeyframe[result.Header.KeyframeCount + 1];
                for (var i = 0; i < result.Keyframes.Length; i++)
                {
                    result.Keyframes[i] = W3dEmitterBlurTimeKeyframe.Parse(reader);
                }

                return result;
            }));
        }