//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.18444
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Moonfish.Guerilla.Tags
{
    using Moonfish.Tags;
    using Moonfish.Model;
    using System.IO;
    using System.Collections.Generic;
    using System.Linq;
    
    [TagClassAttribute("weat")]
    public partial class WeatherSystemBlock : GuerillaBlock, IWriteQueueable
    {
        public GlobalParticleSystemLiteBlock[] ParticleSystem = new GlobalParticleSystemLiteBlock[0];
        public GlobalWeatherBackgroundPlateBlock[] BackgroundPlates = new GlobalWeatherBackgroundPlateBlock[0];
        public GlobalWindModelStructBlock WindModel = new GlobalWindModelStructBlock();
        public float FadeRadius;
        public override int SerializedSize
        {
            get
            {
                return 176;
            }
        }
        public override int Alignment
        {
            get
            {
                return 4;
            }
        }
        public override System.Collections.Generic.Queue<Moonfish.Tags.BlamPointer> ReadFields(System.IO.BinaryReader binaryReader)
        {
            System.Collections.Generic.Queue<Moonfish.Tags.BlamPointer> pointerQueue = new System.Collections.Generic.Queue<Moonfish.Tags.BlamPointer>(base.ReadFields(binaryReader));
            pointerQueue.Enqueue(binaryReader.ReadBlamPointer(140));
            pointerQueue.Enqueue(binaryReader.ReadBlamPointer(936));
            pointerQueue = new System.Collections.Generic.Queue<Moonfish.Tags.BlamPointer>(pointerQueue.Concat(this.WindModel.ReadFields(binaryReader)));
            this.FadeRadius = binaryReader.ReadSingle();
            return pointerQueue;
        }
        public override void ReadInstances(System.IO.BinaryReader binaryReader, System.Collections.Generic.Queue<Moonfish.Tags.BlamPointer> pointerQueue)
        {
            base.ReadInstances(binaryReader, pointerQueue);
            this.ParticleSystem = base.ReadBlockArrayData<GlobalParticleSystemLiteBlock>(binaryReader, pointerQueue.Dequeue());
            this.BackgroundPlates = base.ReadBlockArrayData<GlobalWeatherBackgroundPlateBlock>(binaryReader, pointerQueue.Dequeue());
            this.WindModel.ReadInstances(binaryReader, pointerQueue);
        }
        public override void QueueWrites(Moonfish.Guerilla.QueueableBinaryWriter queueableBinaryWriter)
        {
            base.QueueWrites(queueableBinaryWriter);
            queueableBinaryWriter.QueueWrite(this.ParticleSystem);
            queueableBinaryWriter.QueueWrite(this.BackgroundPlates);
            this.WindModel.QueueWrites(queueableBinaryWriter);
        }
        public override void Write_(Moonfish.Guerilla.QueueableBinaryWriter queueableBinaryWriter)
        {
            base.Write_(queueableBinaryWriter);
            queueableBinaryWriter.WritePointer(this.ParticleSystem);
            queueableBinaryWriter.WritePointer(this.BackgroundPlates);
            this.WindModel.Write_(queueableBinaryWriter);
            queueableBinaryWriter.Write(this.FadeRadius);
        }
    }
}
namespace Moonfish.Tags
{
    
    public partial struct TagClass
    {
        public static TagClass Weat = ((TagClass)("weat"));
    }
}
