public void AddPath(PhysicistPath path) { if (path != null) { this.paths.Add(path); if (string.IsNullOrEmpty(this.startingPath) && this.paths.Count == 1) { this.CurrentPath = path.Name; } } }
public void AddPath(PhysicistPath path) { if (path != null) { this.paths.Add(path.Name, path); if (this.paths.Count == 1) { this.CurrentPath = path.Name; } } }
public override void XmlDeserialize(XElement element) { if (element != null) { this.startingPath = element.GetAttribute("startingPath", string.Empty); this.currentPath = this.startingPath; foreach (var pathEle in element.Elements()) { PhysicistPath path = (PhysicistPath)MapLoader.CreateInstance(pathEle, "class"); path.Screen = this.Screen; path.XmlDeserialize(pathEle); if (path != null) { path.Target = this.target; this.AddPath(path); } } } }