示例#1
0
        private IEnumerator LoadDataFromBackend()
        {
            LoginStatusText.text = STATUS_DOWNLOADING_GAME;

            yield return(InitPlayer());

            // other systems rely on the player's inventory to be inited, so do this before proceeding
            PlayerInventoryManager.Init(mBackend);
            while (mBackend.IsBusy())
            {
                yield return(0);
            }

            ExpeditionUnitSaveData.Init();
            NewsManager.Init(mBackend);
            TreasureDataManager.Init(mBackend);
            TimedChestDataManager.Init(mBackend);
            TimedChestSaveData.Init(mBackend);
            MonsterDataManager.Init(mBackend);
            PlayerDataManager.Init(mBackend);
            LoginPromoManager.Init(mBackend);

            //Constants.Init( mBackend );
            //GenericDataLoader.Init( mBackend );
            //GenericDataLoader.LoadDataOfClass<BuildingData>( GenericDataLoader.BUILDINGS );
            //GenericDataLoader.LoadDataOfClass<UnitData>( GenericDataLoader.UNITS );
            //GenericDataLoader.LoadDataOfClass<GuildData>( GenericDataLoader.GUILDS );

            while (mBackend.IsBusy())
            {
                yield return(0);
            }
            mLoginTimer.StepComplete(LibraryAnalyticEvents.TITLE_DATA_TIME);

            //yield return SetUpPlayerData();

            DoneLoadingData();
        }