예제 #1
0
        public override bool Init(YamLikeCommand cmd)
        {
            if (cmd.has("color"))
            {
                this.Color = cmd["color"].ParseColor(this.Color);
            }

            return(base.Init(cmd));
        }
예제 #2
0
        public override bool Init(YamLikeConfig.Command cmd)
        {
            if (!base.Init(cmd))
            {
                return(false);
            }

            if (cmd.has("fadeout") && cmd["fadeout"] == "1")
            {
                useFadeOut = true;
            }

            if (cmd.has("length"))
            {
                int tmp;
                if (cmd.tryGet("length", out tmp))
                {
                    maxPointCount = tmp;
                }
            }

            if (cmd.has("interval"))
            {
                int tmp;
                if (cmd.tryGet("interval", out tmp))
                {
                    pointIntervalMsc = tmp;
                }
            }

            if (cmd.has("distance"))
            {
                float tmp;
                if (cmd.tryGet("distance", out tmp))
                {
                    distanceSquare = tmp;
                }
            }

            return(true);
        }
예제 #3
0
        public virtual bool Init(YamLikeConfig.Command cmd)
        {
            Vector3 vec3;
            float   tmpF;

            if (cmd.has("XYZ"))
            {
                if (cmd["XYZ"].TryParse(out vec3))
                {
                    this.Center    = vec3;
                    this.FixCenter = true;
                }
            }

            if (cmd.has("xyz"))
            {
                if (cmd["xyz"].TryParse(out vec3))
                {
                    this.Center    = vec3;
                    this.FixCenter = true;
                }
            }

            if (cmd.has("center"))
            {
                if (cmd["center"].TryParse(out vec3))
                {
                    this.Center    = vec3;
                    this.FixCenter = true;
                }
            }

            if (cmd.tryGet("heading", out tmpF))
            {
                this.Heading    = tmpF;
                this.FixHeading = true;
            }

            if (cmd.tryGet("headingOffset", out tmpF))
            {
                this.HeadingOffset = tmpF;
            }

            if (cmd.tryGet("offset", out tmpF))
            {
                this.HeadingOffset = tmpF;
            }

            if (cmd.tryGet("r1", out tmpF))
            {
                this.R1 = tmpF;
            }

            if (cmd.tryGet("radius", out tmpF))
            {
                this.R1 = tmpF;
            }

            if (cmd.tryGet("Radius", out tmpF))
            {
                this.R1 = tmpF;
            }

            if (cmd.tryGet("radiusIn", out tmpF))
            {
                this.R1 = tmpF;
            }

            if (cmd.tryGet("width", out tmpF))
            {
                this.R1 = tmpF;
            }

            if (cmd.tryGet("r2", out tmpF))
            {
                this.R2 = tmpF;
            }

            if (cmd.tryGet("radiusOut", out tmpF))
            {
                this.R2 = tmpF;
            }

            if (cmd.tryGet("length", out tmpF))
            {
                this.R2 = tmpF;
            }

            System.Drawing.Color tmpColor;
            if (cmd.tryGet("c1", out tmpColor))
            {
                this.C1 = tmpColor;
            }

            if (cmd.tryGet("color", out tmpColor))
            {
                this.C1 = tmpColor;
            }

            if (cmd.tryGet("colorIn", out tmpColor))
            {
                this.C1 = tmpColor;
            }

            if (cmd.tryGet("c2", out tmpColor))
            {
                this.C2 = tmpColor;
            }

            if (cmd.tryGet("colorOut", out tmpColor))
            {
                this.C2 = tmpColor;
            }

            if (cmd.tryGet("rangecolor", out tmpColor))
            {
                this.C2 = tmpColor;
            }

            if (cmd.tryGet("point", out tmpColor))
            {
                this.C2 = tmpColor;
            }

            if (cmd.tryGet("angle", out tmpF))
            {
                this.Angle = tmpF;
            }

            if (cmd.tryGet("angleOffset", out tmpF))
            {
                this.AngleOffset = tmpF;
            }

            if (cmd.has("format"))
            {
                this.Text = cmd["format"];
            }

            if (cmd.has("spell_location") && cmd["spell_location"] == "1")
            {
                this.UseSpellLocation = true;
            }

            if (cmd.has("target_location") && cmd["target_location"] == "1")
            {
                this.UseTargetLocation = true;
            }

            return(true);
        }