static SynastryCache() { var synastryReader = new SynastryReader(); var languageProjectSynastryAsset = ResourceLoadUtility.LoadData(LanguageProjectSynastryResource); var languageTechSynastryAsset = ResourceLoadUtility.LoadData(LanguageTechSynastryResource); var knowledgeTechSynastryAsset = ResourceLoadUtility.LoadData(KnowledgeTechSynastryResource); LanguageToProjectSynastry = synastryReader.ParseXml <SkillType, ProjectType>(languageProjectSynastryAsset.text); LanguageToTechSynastry = synastryReader.ParseXml <SkillType, RequiredTechType>(languageTechSynastryAsset.text); KnowledgeToTechSynastry = synastryReader.ParseXml <KnowledgeType, RequiredTechType>(knowledgeTechSynastryAsset.text); }
public void LoadStages() { currentAvailableStages = new List <GameStage>(); allStages = new List <GameStage>(); var projectContent = ResourceLoadUtility.LoadData("Stage").text; var rootElement = XElement.Parse(projectContent); foreach (var stageElement in rootElement.Elements("Stage")) { var newStage = new GameStage(); newStage.RecoverStateFromXml(stageElement.ToString()); allStages.Add(newStage); } }