public override void Read(AssetReader reader)
        {
            base.Read(reader);

            Type = (LightType)reader.ReadInt32();
            if (HasShape(reader.Version))
            {
                Shape = (LightShape)reader.ReadInt32();
            }
            Color.Read(reader);
            if (HasAttenuate(reader.Version))
            {
                Attenuate = reader.ReadBoolean();
                if (IsAlign(reader.Version))
                {
                    reader.AlignStream();
                }
            }
            if (HasIntensity(reader.Version))
            {
                Intensity = reader.ReadSingle();
            }
            Range     = reader.ReadSingle();
            SpotAngle = reader.ReadSingle();
            if (HasInnerSpotAngle(reader.Version))
            {
                InnerSpotAngle = reader.ReadSingle();
            }
            if (HasCookieSize(reader.Version))
            {
                CookieSize = reader.ReadSingle();
            }
            if (HasShadows(reader.Version))
            {
                Shadows.Read(reader);
            }
            Cookie.Read(reader);
            DrawHalo = reader.ReadBoolean();
            if (HasActuallyLightmapped(reader.Version))
            {
                ActuallyLightmapped = reader.ReadBoolean();
            }
            if (IsAlign(reader.Version))
            {
                reader.AlignStream();
            }

            if (HasBakedIndex(reader.Version))
            {
                BakedIndex = reader.ReadInt32();
            }
            if (HasBakingOutput(reader.Version, reader.Flags))
            {
                BakingOutput.Read(reader);
            }
            Flare.Read(reader);
            RenderMode = (LightRenderMode)reader.ReadInt32();
            if (HasCullingMask(reader.Version))
            {
                CullingMask.Read(reader);
            }
            if (HasRenderingLayerMask(reader.Version))
            {
                RenderingLayerMask = reader.ReadInt32();
            }
            if (HasLightmapping(reader.Version))
            {
                Lightmapping = (LightmappingMode)reader.ReadInt32();
            }
            if (HasLightShadowCasterMode(reader.Version))
            {
                LightShadowCasterMode = (LightShadowCasterMode)reader.ReadInt32();
            }
            if (HasAreaSize(reader.Version))
            {
                AreaSize.Read(reader);
            }
            if (HasBounceIntensity(reader.Version))
            {
                BounceIntensity = reader.ReadSingle();
            }
            if (HasFalloffTable(reader.Version))
            {
                FalloffTable.Read(reader);
            }
            if (HasColorTemperature(reader.Version))
            {
                ColorTemperature = reader.ReadSingle();
            }
            if (HasUseColorTemperature(reader.Version))
            {
                UseColorTemperature = reader.ReadBoolean();
                reader.AlignStream();
            }
            if (HasBoundingSphereOverride(reader.Version))
            {
                BoundingSphereOverride.Read(reader);
                UseBoundingSphereOverride = reader.ReadBoolean();
                reader.AlignStream();
            }
#if UNIVERSAL
            if (HasShadowRadius(reader.Version, reader.Flags))
            {
                ShadowRadius = reader.ReadSingle();
                ShadowAngle  = reader.ReadSingle();
            }
#endif
        }
Exemplo n.º 2
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            Type = (LightType)reader.ReadInt32();
            Color.Read(reader);
            if (IsReadAttenuate(reader.Version))
            {
                Attenuate = reader.ReadBoolean();
                if (IsAlign(reader.Version))
                {
                    reader.AlignStream(AlignType.Align4);
                }
            }
            if (IsReadIntensity(reader.Version))
            {
                Intensity = reader.ReadSingle();
            }
            Range     = reader.ReadSingle();
            SpotAngle = reader.ReadSingle();
            if (IsReadCookieSize(reader.Version))
            {
                CookieSize = reader.ReadSingle();
            }
            if (IsReadShadows(reader.Version))
            {
                Shadows.Read(reader);
            }
            Cookie.Read(reader);
            DrawHalo = reader.ReadBoolean();
            if (IsReadActuallyLightmapped(reader.Version))
            {
                ActuallyLightmapped = reader.ReadBoolean();
            }
            if (IsAlign(reader.Version))
            {
                reader.AlignStream(AlignType.Align4);
            }

            if (IsReadBakedIndex(reader.Version))
            {
                BakedIndex = reader.ReadInt32();
            }
            if (IsReadBakingOutput(reader.Version))
            {
                BakingOutput.Read(reader);
            }
            Flare.Read(reader);
            RenderMode = (LightRenderMode)reader.ReadInt32();
            if (IsReadCullingMask(reader.Version))
            {
                CullingMask.Read(reader);
            }
            if (IsReadLightmapping(reader.Version))
            {
                Lightmapping = (LightmappingMode)reader.ReadInt32();
            }
            if (IsReadLightShadowCasterMode(reader.Version))
            {
                LightShadowCasterMode = (LightShadowCasterMode)reader.ReadInt32();
            }
            if (IsReadAreaSize(reader.Version))
            {
                AreaSize.Read(reader);
            }
            if (IsReadBounceIntensity(reader.Version))
            {
                BounceIntensity = reader.ReadSingle();
            }
            if (IsReadFalloffTable(reader.Version))
            {
                FalloffTable.Read(reader);
            }
            if (IsReadColorTemperature(reader.Version))
            {
                ColorTemperature    = reader.ReadSingle();
                UseColorTemperature = reader.ReadBoolean();
                reader.AlignStream(AlignType.Align4);
            }
        }
Exemplo n.º 3
0
        public override void Read(AssetStream stream)
        {
            base.Read(stream);

            Type = (LightType)stream.ReadInt32();
            Color.Read(stream);
            if (IsReadAttenuate(stream.Version))
            {
                Attenuate = stream.ReadBoolean();
                if (IsAlign(stream.Version))
                {
                    stream.AlignStream(AlignType.Align4);
                }
            }
            if (IsReadIntensity(stream.Version))
            {
                Intensity = stream.ReadSingle();
            }
            Range     = stream.ReadSingle();
            SpotAngle = stream.ReadSingle();
            if (IsReadCookieSize(stream.Version))
            {
                CookieSize = stream.ReadSingle();
            }
            if (IsReadShadows(stream.Version))
            {
                Shadows.Read(stream);
            }
            Cookie.Read(stream);
            DrawHalo = stream.ReadBoolean();
            if (IsReadActuallyLightmapped(stream.Version))
            {
                ActuallyLightmapped = stream.ReadBoolean();
            }
            if (IsAlign(stream.Version))
            {
                stream.AlignStream(AlignType.Align4);
            }

            if (IsReadBakedIndex(stream.Version))
            {
                BakedIndex = stream.ReadInt32();
            }
            if (IsReadBakingOutput(stream.Version))
            {
                BakingOutput.Read(stream);
            }
            Flare.Read(stream);
            RenderMode = (LightRenderMode)stream.ReadInt32();
            if (IsReadCullingMask(stream.Version))
            {
                CullingMask.Read(stream);
            }
            if (IsReadLightmapping(stream.Version))
            {
                Lightmapping = (LightmappingMode)stream.ReadInt32();
            }
            if (IsReadAreaSize(stream.Version))
            {
                AreaSize.Read(stream);
            }
            if (IsReadBounceIntensity(stream.Version))
            {
                BounceIntensity = stream.ReadSingle();
            }
            if (IsReadColorTemperature(stream.Version))
            {
                ColorTemperature    = stream.ReadSingle();
                UseColorTemperature = stream.ReadBoolean();
                stream.AlignStream(AlignType.Align4);
            }
        }