//加载配置数据 private IEnumerator LoadConfigs() { yield return(new WaitUntil(() => MissionConifg.IsLoadedOK())); RefreshProgress(); yield return(new WaitUntil(() => TaskConifg.IsLoadedOK())); RefreshProgress(); yield return(new WaitUntil(() => ItemConifg.IsLoadedOK())); RefreshProgress(); yield return(new WaitUntil(() => TreasureBoxConfig.IsLoadedOK())); RefreshProgress(); yield return(new WaitUntil(() => RoleConifg.IsLoadedOK())); RefreshProgress(); yield return(new WaitUntil(() => ActionConifg.IsLoadedOK())); RefreshProgress(); yield return(new WaitUntil(() => SoundConfig.IsLoadedOK())); RefreshProgress(); yield return(new WaitUntil(() => LevelConifg.IsLoadedOK())); RefreshProgress(); yield return(new WaitUntil(() => PlayerDataManager.Init())); RefreshProgress(); Debug.Log("<><MainSceneLoader.LoadConfigs>all configs loaded"); }
/************************************************Unity方法与事件***********************************************/ protected override void Start() { base.Start(); videoPlayer.loopPointReached += (VideoPlayer source) => { bMovieEnd = true; }; BuglyUtil.Init(); videoPlayer.Prepare(); MissionConifg.LoadMissionConfig(); propertyConfig.LoadPropertyConfig(); TaskConifg.LoadTaskData(); ItemConifg.LoadItemsConfig(); TreasureBoxConfig.LoadTreasureBoxConfig(); iconManager.OnlyLoadSelf(); RoleConifg.LoadRoleConfig(); LanConfig.LoadLanConfig(); FontConfig.LoadFontConfig(); I18NConfig.LoadResConfig(); AccessoryConfig.LoadAccessoryConfig(); AwardConfig.LoadAwardConfig(); ActionConifg.LoadActionConfig(); LevelConifg.LoadLevelConfig(); SoundConfig.LoadSoundConfig(); imageProgress.fillAmount = 0; GuLog.Debug("<><Preload>Load Begin!"); StartCoroutine(StartLoading()); #if CLEAR_DATA LocalDataManager.getInstance().deleteAll(); #endif mHeartbearActionManager.addEventListener(mUploadFreindHeatbeatAction); mHeartbearActionManager.addEventListener(mUploadintakeHeatbeatAction); mHeartbeatManager.setHeartbeatListener(() => { GuLog.Debug("Preload start do heart beat"); mHeartbearActionManager.startHeartbeat(); }); }