コード例 #1
0
        public static W3dEmitterInfoV2 Parse(BinaryReader reader)
        {
            var result = new W3dEmitterInfoV2
            {
                BurstSize      = reader.ReadUInt32(),
                CreationVolume = W3dVolumeRandomizer.Parse(reader),
                VelRandom      = W3dVolumeRandomizer.Parse(reader),
                OutwardVel     = reader.ReadSingle(),
                VelInherit     = reader.ReadSingle(),
                Shader         = W3dShader.Parse(reader),
                RenderMode     = reader.ReadUInt32AsEnum <W3dEmitterRenderMode>(),
                FrameMode      = reader.ReadUInt32AsEnum <W3dEmitterFrameMode>()
            };

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

            return(result);
        }
コード例 #2
0
        internal static W3dEmitterInfoV2 Parse(BinaryReader reader, W3dParseContext context)
        {
            return(ParseChunk(reader, context, header =>
            {
                var result = new W3dEmitterInfoV2
                {
                    BurstSize = reader.ReadUInt32(),
                    CreationVolume = W3dVolumeRandomizer.Parse(reader),
                    VelRandom = W3dVolumeRandomizer.Parse(reader),
                    OutwardVel = reader.ReadSingle(),
                    VelInherit = reader.ReadSingle(),
                    Shader = W3dShader.Parse(reader),
                    RenderMode = reader.ReadUInt32AsEnum <W3dEmitterRenderMode>(),
                    FrameMode = reader.ReadUInt32AsEnum <W3dEmitterFrameMode>()
                };

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

                return result;
            }));
        }