Beispiel #1
0
        internal static W3dEmitterFrameHeader Parse(BinaryReader reader)
        {
            var result = new W3dEmitterFrameHeader
            {
                KeyframeCount = reader.ReadUInt32(),
                Random        = reader.ReadSingle()
            };

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

            return(result);
        }
Beispiel #2
0
        internal static W3dEmitterFrameKeyframes Parse(BinaryReader reader)
        {
            var result = new W3dEmitterFrameKeyframes
            {
                Header = W3dEmitterFrameHeader.Parse(reader)
            };

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

            return(result);
        }
Beispiel #3
0
        internal static W3dEmitterFrameKeyframes Parse(BinaryReader reader, W3dParseContext context)
        {
            return(ParseChunk(reader, context, header =>
            {
                var result = new W3dEmitterFrameKeyframes
                {
                    Header = W3dEmitterFrameHeader.Parse(reader)
                };

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

                return result;
            }));
        }