public Dictionary <int, Skill> GetDict() { XElement sc = SkillContainer.Load(path); SkillInfos = sc.Element("Skills").Elements("Skill").Select(c => new Skill().Set(c)).ToDictionary(info => info.id); return(SkillInfos); }
void Awake() { manager = this; DontDestroyOnLoad(gameObject); SkillIds = new List <int> (); skills = SkillContainer.Load(Path.Combine(Application.dataPath, "Data.xml")); foreach (GameObject g in GameObject.FindGameObjectsWithTag("Agent")) { g.GetComponent <TemplateAgent> ().enabled = true; } }
public void Init() { XElement sc = SkillContainer.Load(path); SkillInfos = sc.Element("Skills").Elements("Skill").Select(c => new Skill().Set(c)).ToDictionary(info => info.id); }