public override bool Init(YamLikeConfig.Command cmd) { cmd.tryGet("before", out this.Before); cmd.tryGet("duration", out this.Duration); cmd.tryGet("after", out this.After); return(base.Init(cmd)); }
public override bool Init(YamLikeCommand cmd) { if (!cmd.tryGet("zone", out this.zoneId)) { return(false); } return(base.Init(cmd)); }
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); }
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); }