Exemplo n.º 1
0
        public static AdventureData LoadAdventureData(ResourceManager resourceManager, List <Incidence> incidences)
        {
            var adventureParser = new AdventureHandler(new AdventureData(), resourceManager, incidences);
            var adventureData   = adventureParser.Parse("descriptor.xml");

            return(adventureData);
        }
Exemplo n.º 2
0
        public static IAsyncOperation <AdventureData> LoadAdventureDataAsync(ResourceManager resourceManager, List <Incidence> incidences)
        {
            UnityEngine.Debug.Log("LoadingAdventureData");
            var result = new AsyncCompletionSource <AdventureData>();

            var adventureParser = new AdventureHandler(new AdventureData(), resourceManager, incidences);

            adventureParser.ParseAsync("descriptor.xml")
            .Then(adventureData =>
            {
                UnityEngine.Debug.Log("Done LoadingAdventureData");
                result.SetResult(adventureData);
            });

            return(result);
        }