Пример #1
0
        public override void Read(AssetStream stream)
        {
            base.Read(stream);

            if (IsReadMode(stream.Version))
            {
                Mode = stream.ReadInt32();
            }
            FrameOverTime.Read(stream);
            if (IsReadStartFrame(stream.Version))
            {
                StartFrame.Read(stream);
            }
            TilesX        = stream.ReadInt32();
            TilesY        = stream.ReadInt32();
            AnimationType = stream.ReadInt32();
            RowIndex      = stream.ReadInt32();
            Cycles        = stream.ReadSingle();
            if (IsReadUvChannelMask(stream.Version))
            {
                UvChannelMask = stream.ReadInt32();
            }
            if (IsReadFlipU(stream.Version))
            {
                FlipU = stream.ReadSingle();
                FlipV = stream.ReadSingle();
            }
            RandomRow = stream.ReadBoolean();
            stream.AlignStream(AlignType.Align4);

            if (IsReadSprites(stream.Version))
            {
                m_sprites = stream.ReadArray <SpriteData>();
            }
        }
Пример #2
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            if (IsReadMode(reader.Version))
            {
                Mode = (ParticleSystemAnimationMode)reader.ReadInt32();
            }
            FrameOverTime.Read(reader);
            if (IsReadStartFrame(reader.Version))
            {
                StartFrame.Read(reader);
            }
            TilesX        = reader.ReadInt32();
            TilesY        = reader.ReadInt32();
            AnimationType = (ParticleSystemAnimationType)reader.ReadInt32();
            RowIndex      = reader.ReadInt32();
            Cycles        = reader.ReadSingle();
            if (IsReadUvChannelMask(reader.Version))
            {
                UvChannelMask = reader.ReadInt32();
            }
            if (IsReadFlipU(reader.Version))
            {
                FlipU = reader.ReadSingle();
                FlipV = reader.ReadSingle();
            }
            RandomRow = reader.ReadBoolean();
            reader.AlignStream(AlignType.Align4);

            if (IsReadSprites(reader.Version))
            {
                m_sprites = reader.ReadArray <SpriteData>();
            }
        }
Пример #3
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            if (IsReadMode(reader.Version))
            {
                Mode = (ParticleSystemAnimationMode)reader.ReadInt32();
            }
            if (IsReadTimeMode(reader.Version))
            {
                TimeMode = (ParticleSystemAnimationTimeMode)reader.ReadInt32();
                FPS      = reader.ReadSingle();
            }
            FrameOverTime.Read(reader);
            if (IsReadStartFrame(reader.Version))
            {
                StartFrame.Read(reader);
            }
            if (IsReadSpeedRange(reader.Version))
            {
                SpeedRange.Read(reader);
            }
            TilesX        = reader.ReadInt32();
            TilesY        = reader.ReadInt32();
            AnimationType = (ParticleSystemAnimationType)reader.ReadInt32();
            RowIndex      = reader.ReadInt32();
            Cycles        = reader.ReadSingle();
            if (IsReadUvChannelMask(reader.Version))
            {
                UvChannelMask = reader.ReadInt32();
            }
            if (IsReadFlipU(reader.Version))
            {
                if (IsReadFlipUFirst(reader.Version))
                {
                    FlipU = reader.ReadSingle();
                    FlipV = reader.ReadSingle();
                }
            }
            if (IsReadRowMode(reader.Version))
            {
                RowMode = (ParticleSystemAnimationRowMode)reader.ReadInt32();
            }
            else
            {
                bool RandomRow = reader.ReadBoolean();
                RowMode = RandomRow ? ParticleSystemAnimationRowMode.Random : ParticleSystemAnimationRowMode.Custom;
                reader.AlignStream(AlignType.Align4);
            }

            if (IsReadSprites(reader.Version))
            {
                m_sprites = reader.ReadAssetArray <SpriteData>();
            }
            if (IsReadFlipU(reader.Version))
            {
                if (!IsReadFlipUFirst(reader.Version))
                {
                    FlipU = reader.ReadSingle();
                    FlipV = reader.ReadSingle();
                }
            }
        }