public override void Read(XmlNode os) { foreach (XmlNode current in XmlObject.GetChilds(os)) { switch (current.Name) { case "ID": this.ID = XmlObject.ReadInt(current); break; case "Count": this.Count = XmlObject.ReadInt(current); break; case "NpcID": this.NpcID = XmlObject.ReadInt(current); break; case "DropRate": this.DropRate = XmlObject.ReadFloat(current); break; case "Location": this.Location = new TaskLocation(); this.Location.Read(os); break; } } }
public void Init(TaskLocation pLocation, Action callback) { Reset(); mLocation = pLocation; mOnFinish = callback; Start(); }
public override void Read(XmlNode os) { foreach (XmlNode current in XmlObject.GetChilds(os)) { switch (current.Name) { case "NpcID": this.NpcID = XmlObject.ReadInt(current); break; case "Location": this.Location = new TaskLocation(); this.Location.Read(current); break; case "LifeTime": this.LifeTime = XmlObject.ReadInt(current); break; } } }
public override void Read(XmlNode os) { base.Read(os); foreach (XmlNode current in XmlObject.GetChilds(os)) { switch (current.Name) { case "ConvoyNpcs": XmlObject.GetChilds(current).ForEach(delegate(XmlNode pNode) { TaskConvoyNpc data = new TaskConvoyNpc(); data.Read(pNode); this.ConvoyNpcs.Add(data); }); break; case "SrcLocation": this.SrcLocation = new TaskLocation(); this.SrcLocation.Read(current); break; case "TarLocation": this.TarLocation = new TaskLocation(); this.TarLocation.Read(current); break; case "WayPoints": XmlObject.GetChilds(current).ForEach(delegate(XmlNode pNode) { Vector3 pos = ReadVector3(pNode); this.WayPoints.Add(pos); }); break; } } }