private IEnumerator DoInitialize() { if (MonoBehaviourSingleton <InGameRecorder> .IsValid() && MonoBehaviourSingleton <InGameRecorder> .I.players.Count > 0) { LoadingQueue load_queue = new LoadingQueue(this); LoadObject lo = load_queue.Load(RESOURCE_CATEGORY.UI, "QuestResultDirector", false); List <InGameRecorder.PlayerRecord> playerRecords = MonoBehaviourSingleton <InGameRecorder> .I.players; int m = 0; while (m < playerRecords.Count) { InGameRecorder.PlayerRecord p = playerRecords[m]; if (p == null || p.playerLoadInfo == null) { playerRecords.RemoveAt(m); } else { m++; } } players = MonoBehaviourSingleton <InGameRecorder> .I.CreatePlayerModels(); winnder_voice_id = 0; if (players != null) { winnder_voice_id = players[0].GetVoiceId(ACTION_VOICE_ID.HAPPY_01); load_queue.CacheActionVoice(winnder_voice_id, null); } if (load_queue.IsLoading()) { yield return((object)load_queue.Wait()); } while (true) { bool wait = false; int l = 0; for (int k = players.Length; l < k; l++) { if (players[l].isLoading) { wait = true; break; } } if (!wait) { break; } yield return((object)null); } int j = 0; for (int i = players.Length; j < i; j++) { players[j].animator.set_applyRootMotion(false); } director = ResourceUtility.Realizes(lo.loadedObject, MonoBehaviourSingleton <StageManager> .I._transform, -1).GetComponent <QuestResultDirector>(); director.players = players; } base.Initialize(); }
private IEnumerator Loading() { renderTexture.enableTexture = false; if (userInfo != null && userIndex >= 0) { bool is_owner = userInfo.userId == MonoBehaviourSingleton <PartyManager> .I.GetOwnerUserId(); foreach (Transform item in model) { Transform t = item; Object.Destroy(t.get_gameObject()); } PlayerLoadInfo load_info = new PlayerLoadInfo(); load_info.Apply(userInfo, true, true, true, true); bool wait = true; loader = model.get_gameObject().AddComponent <PlayerLoader>(); loader.StartLoad(load_info, renderTexture.renderLayer, 90, false, false, false, false, false, false, true, true, SHADER_TYPE.UI, delegate { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) ((_003CLoading_003Ec__Iterator105) /*Error near IL_0168: stateMachine*/)._003Cwait_003E__4 = false; float num = (((_003CLoading_003Ec__Iterator105) /*Error near IL_0168: stateMachine*/)._003C_003Ef__this.userInfo.sex != 0) ? MonoBehaviourSingleton <OutGameSettingsManager> .I.statusScene.playerScaleFemale : MonoBehaviourSingleton <OutGameSettingsManager> .I.statusScene.playerScaleMale; ((_003CLoading_003Ec__Iterator105) /*Error near IL_0168: stateMachine*/)._003C_003Ef__this.loader.get_transform().set_localScale(((_003CLoading_003Ec__Iterator105) /*Error near IL_0168: stateMachine*/)._003C_003Ef__this.loader.get_transform().get_localScale().Mul(new Vector3(num, num, num))); }, true, -1); int voice_id = -1; if (!is_owner) { voice_id = loader.GetVoiceId(ACTION_VOICE_EX_ID.ALLIVE_01); LoadingQueue lo_queue = new LoadingQueue(this); lo_queue.CacheActionVoice(voice_id, null); while (lo_queue.IsLoading()) { yield return((object)null); } } while (wait) { yield return((object)null); } animCtrl = PlayerAnimCtrl.Get(loader.animator, PlayerAnimCtrl.battleAnims[load_info.weaponModelID / 1000], null, OnAnimChange, OnAnimEnd); renderTexture.enableTexture = true; if (voice_id > 0) { SoundManager.PlayActionVoice(voice_id, 1f, 0u, null, null); } } }