public override void Load(XmlElement xe) { base.Load(xe); switch (this.Region) { case SkillRegionType.Sphere: { Scope = new ScopeSphere(); ScopeSphere v = Scope as ScopeSphere; v.Offset = XmlObject.ReadVector3(xe, "Offset"); v.Euler = XmlObject.ReadVector3(xe, "Euler"); v.Radius = XmlObject.ReadFloat(xe, "Radius"); } break; case SkillRegionType.Box: { Scope = new ScopeBox(); ScopeBox v = Scope as ScopeBox; v.Offset = XmlObject.ReadVector3(xe, "Offset"); v.Euler = XmlObject.ReadVector3(xe, "Euler"); v.H = XmlObject.ReadFloat(xe, "H"); v.L = XmlObject.ReadFloat(xe, "L"); v.W = XmlObject.ReadFloat(xe, "W"); } break; case SkillRegionType.Cylinder: { Scope = new ScopeCylinder(); ScopeCylinder v = Scope as ScopeCylinder; v.Offset = XmlObject.ReadVector3(xe, "Offset"); v.Euler = XmlObject.ReadVector3(xe, "Euler"); v.MaxDis = XmlObject.ReadFloat(xe, "MaxDis"); v.HAngle = XmlObject.ReadFloat(xe, "HAngle"); v.Height = XmlObject.ReadFloat(xe, "Height"); } break; } }
public override void Load(XmlElement xe) { base.Load(xe); Rate = XmlObject.ReadFloat(xe, "Rate"); Percent = XmlObject.ReadFloat(xe, "Percent"); }