Esempio n. 1
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            Ratio = reader.ReadSingle();
            Light.Read(reader);
            RandomDistribution = reader.ReadBoolean();
            Color     = reader.ReadBoolean();
            Range     = reader.ReadBoolean();
            Intensity = reader.ReadBoolean();
            RangeCurve.Read(reader);
            IntensityCurve.Read(reader);
            MaxLights = reader.ReadInt32();
        }
Esempio n. 2
0
        public override void Read(AssetStream stream)
        {
            base.Read(stream);

            Ratio = stream.ReadSingle();
            Light.Read(stream);
            RandomDistribution = stream.ReadBoolean();
            Color     = stream.ReadBoolean();
            Range     = stream.ReadBoolean();
            Intensity = stream.ReadBoolean();
            RangeCurve.Read(stream);
            IntensityCurve.Read(stream);
            MaxLights = stream.ReadInt32();
        }
Esempio n. 3
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);

            node.Add(RatioName, Ratio);
            node.Add(LightName, Light.ExportYAML(container));
            node.Add(RandomDistributionName, RandomDistribution);
            node.Add(ColorName, Color);
            node.Add(RangeName, Range);
            node.Add(IntensityName, Intensity);
            node.Add(RangeCurveName, RangeCurve.ExportYAML(container));
            node.Add(IntensityCurveName, IntensityCurve.ExportYAML(container));
            node.Add(MaxLightsName, MaxLights);
            return(node);
        }
Esempio n. 4
0
        public override YAMLNode ExportYAML(IAssetsExporter exporter)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(exporter);

            node.Add("ratio", Ratio);
            node.Add("light", Light.ExportYAML(exporter));
            node.Add("randomDistribution", RandomDistribution);
            node.Add("color", Color);
            node.Add("range", Range);
            node.Add("intensity", Intensity);
            node.Add("rangeCurve", RangeCurve.ExportYAML(exporter));
            node.Add("intensityCurve", IntensityCurve.ExportYAML(exporter));
            node.Add("maxLights", MaxLights);
            return(node);
        }
Esempio n. 5
0
 private double CalculateRange(double intervalPos)
 {
     return(ScaleCurveToValue(RangeCurve.GetValue(intervalPos), 200, 1));
 }