Beispiel #1
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);

            node.Add(Mode0Name, (int)Mode0);
            node.Add(VectorComponentCount0Name, VectorComponentCount0);
            node.Add(Color0Name, Color0.ExportYAML(container));
            //node.Add("colorLabel0", HasLabel(container.Flags) ? ColorLabel0 : "Color");
            node.Add(Vector00Name, Vector0_0.ExportYAML(container));
            //node.Add("vectorLabel0_0", HasLabel(container.Flags) ? VectorLabel0_0 : "X");
            node.Add(Vector01Name, Vector0_1.ExportYAML(container));
            //node.Add("vectorLabel0_1", HasLabel(container.Flags) ? VectorLabel0_1 : "Y");
            node.Add(Vector02Name, Vector0_2.ExportYAML(container));
            //node.Add("vectorLabel0_2", HasLabel(container.Flags) ? VectorLabel0_2 : "Z");
            node.Add(Vector03Name, Vector0_3.ExportYAML(container));
            //node.Add("vectorLabel0_3", HasLabel(container.Flags) ? VectorLabel0_3 : "W");
            node.Add(Mode1Name, (int)Mode1);
            node.Add(VectorComponentCount1Name, VectorComponentCount1);
            node.Add(Color1Name, Color1.ExportYAML(container));
            //node.Add("colorLabel1", HasLabel(container.Flags) ? ColorLabel1 : "Color");
            node.Add(Vector10Name, Vector1_0.ExportYAML(container));
            //node.Add("vectorLabel1_0", HasLabel(container.Flags) ? VectorLabel1_0 : "X");
            node.Add(Vector11Name, Vector1_1.ExportYAML(container));
            //node.Add("vectorLabel1_1", HasLabel(container.Flags) ? VectorLabel1_1 : "Y");
            node.Add(Vector12Name, Vector1_2.ExportYAML(container));
            //node.Add("vectorLabel1_2", HasLabel(container.Flags) ? VectorLabel1_2 : "Z");
            node.Add(Vector13Name, Vector1_3.ExportYAML(container));
            //node.Add("vectorLabel1_3", HasLabel(container.Flags) ? VectorLabel1_3 : "W");
            return(node);
        }
Beispiel #2
0
        protected override void OnPaintSurface(SKPaintGLSurfaceEventArgs e)
        {
            base.OnPaintSurface(e);

            var paint = new SKPaint
            {
                Color       = Color2.ToSKColor(),
                Style       = SKPaintStyle.Fill,
                IsAntialias = true
            };

            var bounds = e.Surface.Canvas.LocalClipBounds;
            var canvas = e.Surface.Canvas;

            canvas.Clear(Color1.ToSKColor());

            var point1 = new SKPoint(0, bounds.Height);
            var point2 = new SKPoint(bounds.Width / 2, bounds.Height);
            var point3 = new SKPoint(bounds.Width / 2, 0);
            var point4 = new SKPoint(bounds.Width, 0);
            var point5 = new SKPoint(bounds.Width, bounds.Height);

            using (var path = new SKPath())
            {
                path.MoveTo(point1);
                path.CubicTo(point2, point3, point4);
                path.LineTo(point5);
                path.Close();
                canvas.DrawPath(path, paint);
            }
        }
Beispiel #3
0
 // Lerp
 public void Lerp(ref SpriteColors from, ref SpriteColors to, float f01)
 {
     Color0.Lerp(from.Color0, to.Color0, f01);
     Color1.Lerp(from.Color1, to.Color1, f01);
     Color2.Lerp(from.Color2, to.Color2, f01);
     Color3.Lerp(from.Color3, to.Color3, f01);
 }
Beispiel #4
0
        public override string ToString()
        {
            string text = ItemClass + "\n" + Name
                          + "\n" + R.Package + ":" + Collection + "(" + Slot + ")"
                          + "\n" + R.Category + ":" + MainCategory + "," + SubCategory + "";

            text += "\n" + R.MaxStackCount + ":" + (MaxStack < 0? R.UnLimit :"" + MaxStack);
            if (Color1 != 0)
            {
                text += "\n" + R.Color + ":" + "#" + Color1.ToString("X")
                        + "," + (Color2 == 0 ? "-" : "#" + Color2.ToString("X"))
                        + "," + (Color3 == 0 ? "-" : "#" + Color3.ToString("X"));
            }
            text += "\n" + R.ClassRestriction + ":" + ClassInfoEx.GetClassText(this.RequiredClass);
            if (Stat != null)
            {
                text += Stat.ToString();
            }
            if (Attributes != null)
            {
                foreach (ItemAttribute attr in Attributes)
                {
                    text += "\n" + attr.ToString();
                }
            }
            text += "\n" + Desc;
            if (Time != "-")
            {
                text += "\n" + R.TimeDate + ":" + Time;
            }
            return(text);
        }
        public override YAMLNode ExportYAML(IAssetsExporter exporter)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(exporter);

            node.Add("mode0", Mode0);
            node.Add("vectorComponentCount0", VectorComponentCount0);
            node.Add("color0", Color0.ExportYAML(exporter));
            node.Add("colorLabel0", IsReadLabel(exporter.Platform) ? ColorLabel0 : "Color");
            node.Add("vector0_0", Vector0_0.ExportYAML(exporter));
            node.Add("vectorLabel0_0", IsReadLabel(exporter.Platform) ? VectorLabel0_0 : "X");
            node.Add("vector0_1", Vector0_1.ExportYAML(exporter));
            node.Add("vectorLabel0_1", IsReadLabel(exporter.Platform) ? VectorLabel0_1 : "Y");
            node.Add("vector0_2", Vector0_2.ExportYAML(exporter));
            node.Add("vectorLabel0_2", IsReadLabel(exporter.Platform) ? VectorLabel0_2 : "Z");
            node.Add("vector0_3", Vector0_3.ExportYAML(exporter));
            node.Add("vectorLabel0_3", IsReadLabel(exporter.Platform) ? VectorLabel0_3 : "W");
            node.Add("mode1", Mode1);
            node.Add("vectorComponentCount1", VectorComponentCount1);
            node.Add("color1", Color1.ExportYAML(exporter));
            node.Add("colorLabel1", IsReadLabel(exporter.Platform) ? ColorLabel1 : "Color");
            node.Add("vector1_0", Vector1_0.ExportYAML(exporter));
            node.Add("vectorLabel1_0", IsReadLabel(exporter.Platform) ? VectorLabel1_0 : "X");
            node.Add("vector1_1", Vector1_1.ExportYAML(exporter));
            node.Add("vectorLabel1_1", IsReadLabel(exporter.Platform) ? VectorLabel1_1 : "Y");
            node.Add("vector1_2", Vector1_2.ExportYAML(exporter));
            node.Add("vectorLabel1_2", IsReadLabel(exporter.Platform) ? VectorLabel1_2 : "Z");
            node.Add("vector1_3", Vector1_3.ExportYAML(exporter));
            node.Add("vectorLabel1_3", IsReadLabel(exporter.Platform) ? VectorLabel1_3 : "W");
            return(node);
        }
Beispiel #6
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);

            node.Add("mode0", (int)Mode0);
            node.Add("vectorComponentCount0", VectorComponentCount0);
            node.Add("color0", Color0.ExportYAML(container));
            //node.Add("colorLabel0", IsReadLabel(container.Flags) ? ColorLabel0 : "Color");
            node.Add("vector0_0", Vector0_0.ExportYAML(container));
            //node.Add("vectorLabel0_0", IsReadLabel(container.Flags) ? VectorLabel0_0 : "X");
            node.Add("vector0_1", Vector0_1.ExportYAML(container));
            //node.Add("vectorLabel0_1", IsReadLabel(container.Flags) ? VectorLabel0_1 : "Y");
            node.Add("vector0_2", Vector0_2.ExportYAML(container));
            //node.Add("vectorLabel0_2", IsReadLabel(container.Flags) ? VectorLabel0_2 : "Z");
            node.Add("vector0_3", Vector0_3.ExportYAML(container));
            //node.Add("vectorLabel0_3", IsReadLabel(container.Flags) ? VectorLabel0_3 : "W");
            node.Add("mode1", (int)Mode1);
            node.Add("vectorComponentCount1", VectorComponentCount1);
            node.Add("color1", Color1.ExportYAML(container));
            //node.Add("colorLabel1", IsReadLabel(container.Flags) ? ColorLabel1 : "Color");
            node.Add("vector1_0", Vector1_0.ExportYAML(container));
            //node.Add("vectorLabel1_0", IsReadLabel(container.Flags) ? VectorLabel1_0 : "X");
            node.Add("vector1_1", Vector1_1.ExportYAML(container));
            //node.Add("vectorLabel1_1", IsReadLabel(container.Flags) ? VectorLabel1_1 : "Y");
            node.Add("vector1_2", Vector1_2.ExportYAML(container));
            //node.Add("vectorLabel1_2", IsReadLabel(container.Flags) ? VectorLabel1_2 : "Z");
            node.Add("vector1_3", Vector1_3.ExportYAML(container));
            //node.Add("vectorLabel1_3", IsReadLabel(container.Flags) ? VectorLabel1_3 : "W");
            return(node);
        }
Beispiel #7
0
        public override string ToString()
        {
            string text = "物品ID:" + ItemClass + "\n物品名:" + ItemName
                          + "\n背包:" + Collection + ",格子:" + Slot
                          + "\n类型:" + MainCategory + " [" + SubCategory + "]";

            text += "\n最大堆叠数量:" + (MaxStack < 0?"不限":"" + MaxStack);

            if (Color1 != 0)
            {
                text += "\n颜色:" + (Color1 == 0 ? "无" : "#" + Color1.ToString("X"))
                        + "," + (Color2 == 0 ? "无" : "#" + Color2.ToString("X"))
                        + "," + (Color3 == 0 ? "无" : "#" + Color3.ToString("X"));
            }
            text += "\n职业限制:" + ClassInfoEx.GetClassText(this.RequiredClass);
            if (Stat != null)
            {
                text += Stat.ToString();
            }
            if (Attributes != null)
            {
                foreach (ItemAttribute attr in Attributes)
                {
                    text += "\n" + attr.ToString();
                }
            }
            text += "\n物品描述:" + ItemDesc;
            if (Time != "无限期")
            {
                text += "\n到期时间:" + Time;
            }
            return(text);
        }
Beispiel #8
0
 /// <summary>
 /// パラメータをリセットする
 /// </summary>
 public void Reset()
 {
     MaterialName = "";
     OffsetX      = 0;
     OffsetY      = 0;
     Color1.Reset();
 }
Beispiel #9
0
        public async Task <IActionResult> Edit(byte id, [Bind("Id,Name,Descrition")] Color1 color1)
        {
            if (id != color1.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(color1);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!Color1Exists(color1.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(Redirect("/Admin/Color1/Index"));
            }
            return(View(color1));
        }
Beispiel #10
0
        public bool Equals(CarGenerator other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Model.Equals(other.Model) &&
                   Position.Equals(other.Position) &&
                   Heading.Equals(other.Heading) &&
                   Color1.Equals(other.Color1) &&
                   Color2.Equals(other.Color2) &&
                   ForceSpawn.Equals(other.ForceSpawn) &&
                   AlarmChance.Equals(other.AlarmChance) &&
                   LockedChance.Equals(other.LockedChance) &&
                   MinDelay.Equals(other.MinDelay) &&
                   MaxDelay.Equals(other.MaxDelay) &&
                   Timer.Equals(other.Timer) &&
                   Handle.Equals(other.Handle) &&
                   Enabled.Equals(other.Enabled) &&
                   IsBlocking.Equals(other.IsBlocking) &&
                   CollisionBoundingMin.Equals(other.CollisionBoundingMin) &&
                   CollisionBoundingMax.Equals(other.CollisionBoundingMax) &&
                   CollisionSize.Equals(other.CollisionSize));
        }
Beispiel #11
0
        public override string ToString()
        {
            string summary = Color1.ToString().Substring(0, 1) + Color2.ToString().Substring(0, 1) + Color3.ToString().Substring(0, 1);

            summary = summary.Replace("N", "") + "+";
            if (Stats.Agility > 0)
            {
                summary += Stats.Agility.ToString() + "Agi";
            }
            if (Stats.Stamina > 0)
            {
                summary += Stats.Stamina.ToString() + "Sta";
            }
            if (Stats.DodgeRating > 0)
            {
                summary += Stats.DodgeRating.ToString() + "Dodge";
            }
            if (Stats.DefenseRating > 0)
            {
                summary += Stats.DefenseRating.ToString() + "Def";
            }
            if (Stats.Resilience > 0)
            {
                summary += Stats.Resilience.ToString() + "Res";
            }
            if (summary.EndsWith("+"))
            {
                summary = summary.Substring(0, summary.Length - 1);
            }
            return(summary);
        }
Beispiel #12
0
        private void Update(EvaluationContext context)
        {
            _gradient.Steps.Clear();
            foreach (var slots in _slots)
            {
                var pos = slots.PositionSlot.GetValue(context);
                if (pos < 0)
                {
                    continue;
                }

                _gradient.Steps.Add(new Gradient.Step
                {
                    NormalizedPosition = pos,
                    Color = slots.ColorSlot.GetValue(context),
                    Id    = slots.PositionSlot.Id
                });
            }

            if (_gradient.Steps.Count == 0)
            {
                _gradient.Steps.Add(new Gradient.Step
                {
                    NormalizedPosition = 0,
                    Color = Color1.GetValue(context),
                    Id    = Color1Pos.Id
                });
            }
            _gradient.Steps.Sort((x, y) => x.NormalizedPosition.CompareTo(y.NormalizedPosition));

            OutGradient.Value = _gradient;    //FIXME: This might not be efficient or required
        }
        public override void Read(AssetStream stream)
        {
            base.Read(stream);

            Mode0 = stream.ReadInt32();
            VectorComponentCount0 = stream.ReadInt32();
            Color0.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                ColorLabel0 = stream.ReadStringAligned();
            }
            Vector0_0.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel0_0 = stream.ReadStringAligned();
            }
            Vector0_1.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel0_1 = stream.ReadStringAligned();
            }
            Vector0_2.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel0_2 = stream.ReadStringAligned();
            }
            Vector0_3.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel0_3 = stream.ReadStringAligned();
            }
            Mode1 = stream.ReadInt32();
            VectorComponentCount1 = stream.ReadInt32();
            Color1.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                ColorLabel1 = stream.ReadStringAligned();
            }
            Vector1_0.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel1_0 = stream.ReadStringAligned();
            }
            Vector1_1.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel1_1 = stream.ReadStringAligned();
            }
            Vector1_2.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel1_2 = stream.ReadStringAligned();
            }
            Vector1_3.Read(stream);
            if (IsReadLabel(stream.Flags))
            {
                VectorLabel1_3 = stream.ReadStringAligned();
            }
        }
Beispiel #14
0
 public void Read(AssetReader reader)
 {
     Color0.Read(reader);
     Color1.Read(reader);
     Color2.Read(reader);
     Color3.Read(reader);
     Color4.Read(reader);
 }
Beispiel #15
0
        public Color1 ConvertToColor1()
        {
            Color1 color = new Color1();

            color.a = a;

            return(color);
        }
Beispiel #16
0
 public void Write(AssetWriter writer)
 {
     Color0.Write(writer);
     Color1.Write(writer);
     Color2.Write(writer);
     Color3.Write(writer);
     Color4.Write(writer);
 }
 public void Read(BinaryReader reader, byte[] version)
 {
     Color1.Read(reader);
     Color2.Read(reader);
     if (version[0] >= 0 && version[1] >= 1 && version[2] >= 8)
     {
         doRgbGradient = reader.ReadBoolean();
     }
 }
Beispiel #18
0
        public async Task <IActionResult> Create([Bind("Id,Name,Descrition")] Color1 color1)
        {
            if (ModelState.IsValid)
            {
                _context.Add(color1);
                await _context.SaveChangesAsync();

                return(Redirect("/Admin/Color1/Index"));
            }
            return(View(color1));
        }
Beispiel #19
0
        public YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = new YAMLMappingNode();

            node.Add(Color0Name, Color0.ExportYAML(container));
            node.Add(Color1Name, Color1.ExportYAML(container));
            node.Add(Color2Name, Color2.ExportYAML(container));
            node.Add(Color3Name, Color3.ExportYAML(container));
            node.Add(Color4Name, Color4.ExportYAML(container));
            return(node);
        }
 public override int GetHashCode()
 {
     //Optional override. Only here for completeness with required Equals() override.
     //Really only required for hash tables and dictionaries.
     unchecked
     {
         int hash = 13;
         hash = (hash * 7) + Color1.GetHashCode();
         hash = (hash * 7) + this.Style == GradientStyle.Solid ? 0 : Color2.GetHashCode();
         hash = (hash * 7) + Style.GetHashCode();
         hash = (hash * 7) + this.Style == GradientStyle.Solid ? 0 : GammaCorrection.GetHashCode();
         return(hash);
     }
 }
Beispiel #21
0
 /// <summary>
 ///     Setea y configura la technique que muestra el pincel sobre el terreno.
 /// </summary>
 /// <param name="terrain"></param>
 public virtual void configureTerrainEffect(SmartTerrain terrain)
 {
     if (Rounded)
     {
         terrain.Technique = "PositionColoredTexturedWithRoundBrush";
     }
     else
     {
         terrain.Technique = "PositionColoredTexturedWithSquareBrush";
     }
     terrain.Effect.SetValue("brushPosition", new[] { Position.X, Position.Z });
     terrain.Effect.SetValue("brushRadius", Radius);
     terrain.Effect.SetValue("brushHardness", Hardness);
     terrain.Effect.SetValue("brushColor1", Color1.ToArgb());
     terrain.Effect.SetValue("brushColor2", Color2.ToArgb());
 }
Beispiel #22
0
        public bool Equals(StoredCar other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Model.Equals(other.Model) &&
                   Position.Equals(other.Position) &&
                   Angle.Equals(other.Angle) &&
                   Flags.Equals(other.Flags) &&
                   Color1.Equals(other.Color1) &&
                   Color2.Equals(other.Color2) &&
                   Radio.Equals(other.Radio) &&
                   Extra1.Equals(other.Extra1) &&
                   Extra2.Equals(other.Extra2) &&
                   Bomb.Equals(other.Bomb));
        }
Beispiel #23
0
        public bool Equals(StoredCar other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Model.Equals(other.Model) &&
                   Position.Equals(other.Position) &&
                   Math.Abs(Heading - other.Heading) < 0.001 &&
                   Math.Abs(Pitch - other.Pitch) < 0.001 &&
                   Traction.Equals(other.Traction) &&
                   Flags.Equals(other.Flags) &&
                   Color1.Equals(other.Color1) &&
                   Color2.Equals(other.Color2) &&
                   Radio.Equals(other.Radio) &&
                   Extra1.Equals(other.Extra1) &&
                   Extra2.Equals(other.Extra2));
        }
        public List <TextMenu.Item> CreateMenu(TextMenu menu, bool inGame)
        {
            List <TextMenu.Item> colorMenus = new List <TextMenu.Item>();

            colorMenus.Add(new TextMenu.Button("Color 1: " + Color1.ToString()).Pressed(() =>
            {
                Audio.Play(SFX.ui_main_savefile_rename_start);
                menu.SceneAs <Overworld>().Goto <OuiModOptionString>().Init <OuiModOptions>(Color1.ToString(), v => { Color1 = new HSVColor(v); }, 9);
            }));

            colorMenus.Add(new TextMenu.Button("Color 2: " + Color2.ToString()).Pressed(() =>
            {
                Audio.Play(SFX.ui_main_savefile_rename_start);
                menu.SceneAs <Overworld>().Goto <OuiModOptionString>().Init <OuiModOptions>(Color2.ToString(), v => { Color2 = new HSVColor(v); }, 9);
            }));

            colorMenus.Add(new TextMenu.OnOff("Rgb Gradient", doRgbGradient).Change(v => doRgbGradient = v));

            return(colorMenus);
        }
Beispiel #25
0
        public bool Equals(Vehicle other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Type.Equals(other.Type) &&
                   ModelIndex.Equals(other.ModelIndex) &&
                   Handle.Equals(other.Handle) &&
                   Matrix.Equals(other.Matrix) &&
                   EntityType.Equals(other.EntityType) &&
                   EntityStatus.Equals(other.EntityStatus) &&
                   EntityFlags.Equals(other.EntityFlags) &&
                   AutoPilot.Equals(other.AutoPilot) &&
                   Color1.Equals(other.Color1) &&
                   Color2.Equals(other.Color2) &&
                   AlarmState.Equals(other.AlarmState) &&
                   MaxNumPassengers.Equals(other.MaxNumPassengers) &&
                   Field1D0h.Equals(other.Field1D0h) &&
                   Field1D4h.Equals(other.Field1D4h) &&
                   Field1D8h.Equals(other.Field1D8h) &&
                   Field1DCh.Equals(other.Field1DCh) &&
                   SteerAngle.Equals(other.SteerAngle) &&
                   GasPedal.Equals(other.GasPedal) &&
                   BrakePedal.Equals(other.BrakePedal) &&
                   CreatedBy.Equals(other.CreatedBy) &&
                   IsLawEnforcer.Equals(other.IsLawEnforcer) &&
                   IsLockedByScript.Equals(other.IsLockedByScript) &&
                   IsEngineOn.Equals(other.IsEngineOn) &&
                   IsHandbrakeOn.Equals(other.IsHandbrakeOn) &&
                   LightsOn.Equals(other.LightsOn) &&
                   HasFreebies.Equals(other.HasFreebies) &&
                   Health.Equals(other.Health) &&
                   CurrentGear.Equals(other.CurrentGear) &&
                   ChangeGearTime.Equals(other.ChangeGearTime) &&
                   TimeOfDeath.Equals(other.TimeOfDeath) &&
                   BombTimer.Equals(other.BombTimer) &&
                   DoorLock.Equals(other.DoorLock));
        }
Beispiel #26
0
        /// <summary>
        /// 测试Flag
        /// </summary>
        public static void FlagsAttributeTest()
        {
            Console.WriteLine("测试未使用FlagsAttribute属性");
            Color1 MyColor1 = Color1.Red | Color1.Blue & Color1.Green;

            //我先不运行计算一下看看是那个:0001|0100&0010=0001  应该是Red
            Console.WriteLine("MyColor1={0}", MyColor1);
            Color1 MyColor_1 = Color1.Red | Color1.Blue;

            //我先不运行计算一下看看是那个:0001|0100=0101  应该是5
            Console.WriteLine("MyColor_1={0}", MyColor_1);
            Console.WriteLine("测试使用FlagsAttribute属性");
            Color2 MyColor2 = Color2.Red | Color2.Blue;

            //我先不运行计算一下看看是那个:0001|0100=0101应该是Red,Blue
            Console.WriteLine("MyColor2={0}", MyColor2);

            Console.WriteLine("------------------求交集------------------");
            Color2 color3 = MyColor2 & Color2.Blue;//求交集

            Console.WriteLine(color3);
        }
Beispiel #27
0
 public String ParseMountColor()
 {
     return((Color1 == -1 ? "" : Color1.ToString("X")) + "," + (Color2 == -1 ? "" : Color2.ToString("X")) + "," + (Color3 == -1 ? "" : Color3.ToString("X")));
 }
Beispiel #28
0
        public override void Read(AssetReader reader)
        {
            base.Read(reader);

            Mode0 = (ParticleSystemCustomDataMode)reader.ReadInt32();
            VectorComponentCount0 = reader.ReadInt32();
            Color0.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                ColorLabel0 = reader.ReadString();
            }
#endif
            Vector0_0.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel0_0 = reader.ReadString();
            }
#endif
            Vector0_1.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel0_1 = reader.ReadString();
            }
#endif
            Vector0_2.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel0_2 = reader.ReadString();
            }
#endif
            Vector0_3.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel0_3 = reader.ReadString();
            }
#endif
            Mode1 = (ParticleSystemCustomDataMode)reader.ReadInt32();
            VectorComponentCount1 = reader.ReadInt32();
            Color1.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                ColorLabel1 = reader.ReadString();
            }
#endif
            Vector1_0.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel1_0 = reader.ReadString();
            }
#endif
            Vector1_1.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel1_1 = reader.ReadString();
            }
#endif
            Vector1_2.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel1_2 = reader.ReadString();
            }
#endif
            Vector1_3.Read(reader);
#if UNIVERSAL
            if (IsReadLabel(reader.Flags))
            {
                VectorLabel1_3 = reader.ReadString();
            }
#endif
        }
Beispiel #29
0
 public string PatternColors(char separator)
 {
     return((Color1 == -1 ? "-1" : Color1.ToString("x")) + separator + (Color2 == -1 ? "-1" : Color2.ToString("x")) + separator + (Color3 == -1 ? "-1" : Color3.ToString("x")));
 }
 public void Write(BinaryWriter writer)
 {
     Color1.Write(writer);
     Color2.Write(writer);
     writer.Write(doRgbGradient);
 }