Пример #1
0
        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);
        }
Пример #2
0
    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);
        }
    }