Inheritance: IBinarySerializable
Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FogInstance"/> class.
        /// </summary>
        /// <param name="inData">The binary data.</param>
        public FogInstance(byte[] inData)
        {
            using var ms = new MemoryStream(inData);
            using var br = new BinaryReader(ms);
            Flags        = (FogFlags)br.ReadUInt32();
            Position     = br.ReadVector3();

            GlobalStartRadius = br.ReadSingle();
            GlobalEndRadius   = br.ReadSingle();

            LandFog       = new FogDefinition(br.ReadBytes(FogDefinition.GetSize()));
            UnderwaterFog = new FogDefinition(br.ReadBytes(FogDefinition.GetSize()));
        }
Exemplo n.º 2
0
        public FogInstance(byte[] inData)
        {
            using (MemoryStream ms = new MemoryStream(inData))
            {
                using (BinaryReader br = new BinaryReader(ms))
                {
                    this.Flags = (FogFlags) br.ReadUInt32();
                    this.Position = br.ReadVector3f();

                    this.GlobalStartRadius = br.ReadSingle();
                    this.GlobalEndRadius = br.ReadSingle();

                    this.LandFog = new FogDefinition(br.ReadBytes(FogDefinition.GetSize()));
                    this.UnderwaterFog = new FogDefinition(br.ReadBytes(FogDefinition.GetSize()));
                }
            }
        }
Exemplo n.º 3
0
        public FogInstance(byte[] inData)
        {
            using (MemoryStream ms = new MemoryStream(inData))
            {
                using (BinaryReader br = new BinaryReader(ms))
                {
                    this.Flags    = (FogFlags)br.ReadUInt32();
                    this.Position = br.ReadVector3();

                    this.GlobalStartRadius = br.ReadSingle();
                    this.GlobalEndRadius   = br.ReadSingle();

                    this.LandFog       = new FogDefinition(br.ReadBytes(FogDefinition.GetSize()));
                    this.UnderwaterFog = new FogDefinition(br.ReadBytes(FogDefinition.GetSize()));
                }
            }
        }