protected void SetRenderPlayerModel(PlayerLoadInfo load_player_info) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) SetRenderPlayerModel(transRoot, UI.TEX_MODEL, load_player_info, record.animID, new Vector3(0f, -0.75f, 14f), new Vector3(0f, 180f, 0f), isVisualMode, delegate(PlayerLoader player_loader) { if (player_loader != null) { loader = player_loader; } if (loader != null && loader.animator != null) { if (MonoBehaviourSingleton <InGameRecorder> .IsValid()) { if (MonoBehaviourSingleton <InGameRecorder> .I.isVictory) { loader.animator.Play("win_loop"); } } else { PlayerAnimCtrl.Get(loader.animator, PlayerAnimCtrl.battleAnims[record.playerLoadInfo.weaponModelID / 1000], null, null, null); } } }); }
private void OnAnimEnd(PlayerAnimCtrl anim_ctrl, PLCA anim) { if (animEndCallback != null) { animEndCallback(); } }
private void OnModelLoadComplete(Animator animator) { if (animator != null) { playerAnimCtrl = PlayerAnimCtrl.Get(animator, idleAnim, null, null, null); } isLoading = false; }
protected void OnAnimEnd(PlayerAnimCtrl anim_ctrl, PLCA anim) { if (this is LoungeMoveNPC) { animCtrl.PlayDefault(false); } else { animCtrl.PlayIdleAnims(sexType, false); } }
protected override void OnAnimPlay(PlayerAnimCtrl anim_ctrl, PLCA anim) { if (anim == PLCA.WALK) { animator.set_applyRootMotion(true); } else { animator.set_applyRootMotion((anim == anim_ctrl.moveAnim) ? true : false); } }
protected override void InitAnim() { PLCA default_anim = PLCA.IDLE_01; string loopAnim = npcInfo.GetLoopAnim(); if (!string.IsNullOrEmpty(loopAnim)) { default_anim = PlayerAnimCtrl.StringToEnum(loopAnim); } animCtrl = PlayerAnimCtrl.Get(animator, default_anim, OnAnimPlay, null, base.OnAnimEnd); }
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); } } }
private void CompleteStoryNPCLoading(NPCTable.NPCData npc_data) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) PLCA default_anim = PlayerAnimCtrl.StringToEnum(npc_data.anim); model.set_localPosition(new Vector3(0f, -1.5f, 1.5f)); model.set_localEulerAngles(new Vector3(0f, 180f, 0f)); PlayerAnimCtrl.Get(loader.animator, default_anim, null, null, null); EnableRenderTexture(UI.TEX_ENEMY); SetActive((Enum)UI.OBJ_LOADING, false); GetCtrl(UI.SPR_LOAD_ROTATE_CIRCLE).set_localRotation(Quaternion.get_identity()); loadComplete = true; }
private void WaitInFreeMove() { waitTime -= Time.get_deltaTime(); if (!string.IsNullOrEmpty(wayPoint.waitAnimStateName)) { PLCA anim = PlayerAnimCtrl.StringToEnum(wayPoint.waitAnimStateName); animCtrl.Play(anim, false); } else if (this is LoungeMoveNPC) { animCtrl.PlayDefault(false); } else { animCtrl.PlayIdleAnims(sexType, false); } }
private void OnAnimChange(PlayerAnimCtrl anim_ctrl, PLCA anim) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) if (!(loader == null)) { bool active = anim_ctrl.IsPlaying(PlayerAnimCtrl.battleAnims); if (loader.wepL != null) { loader.wepL.get_gameObject().SetActive(active); } if (loader.wepR != null) { loader.wepR.get_gameObject().SetActive(active); } } }
public static StoryCharacter Initialize(int id, UITexture ui_tex, string _name, string _dir, string idle_anim) { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Expected O, but got Unknown //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Expected O, but got Unknown NPCTable.NPCData nPCData = Singleton <NPCTable> .I.GetNPCData(_name); if (nPCData == null) { return(null); } UIRenderTexture uIRenderTexture = UIRenderTexture.Get(ui_tex, -1f, true, -1); uIRenderTexture.Disable(); uIRenderTexture.nearClipPlane = 1f; uIRenderTexture.farClipPlane = 100f; Transform val = Utility.CreateGameObject("StoryModel", uIRenderTexture.modelTransform, uIRenderTexture.renderLayer); StoryCharacter storyCharacter = val.get_gameObject().AddComponent <StoryCharacter>(); storyCharacter.model = val; storyCharacter.id = id; storyCharacter.renderTex = uIRenderTexture; storyCharacter.uiTex = ui_tex; storyCharacter.charaName = _name; storyCharacter.aliasName = string.Empty; storyCharacter.SetStandPosition(_dir, false); if (string.IsNullOrEmpty(idle_anim)) { storyCharacter.idleAnim = PlayerAnimCtrl.StringToEnum(nPCData.anim); } else { storyCharacter.idleAnim = PlayerAnimCtrl.StringToEnum(idle_anim); } storyCharacter.isLoading = true; ModelLoaderBase modelLoaderBase = nPCData.LoadModel(val.get_gameObject(), false, false, storyCharacter.OnModelLoadComplete, false); storyCharacter.npcLoader = (modelLoaderBase as NPCLoader); storyCharacter.CollectTween(ui_tex.get_transform()); return(storyCharacter); }
public void DeleteModel() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) if (!AppMain.isApplicationQuit) { if (renderTexture != null) { Object.DestroyImmediate(renderTexture); renderTexture = null; } if (model != null) { Object.Destroy(model.get_gameObject()); model = null; loader = null; animCtrl = null; } } }
private void OpenMessage(Animator animator) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) isLoading = false; Open(UITransition.TYPE.OPEN); if (needUpdateAnchors) { needUpdateAnchors = false; UpdateAnchors(); } model.set_localPosition(message.pos); model.set_localEulerAngles(message.rot); if (animator != null) { PlayerAnimCtrl.Get(animator, PlayerAnimCtrl.StringToEnum(npcData.anim), null, null, null); } EnableRenderTexture(targetTex); string replaceText = message.GetReplaceText(); SetColor((Enum)UI.SPR_MESSAGE, (!isShowMessage || string.IsNullOrEmpty(replaceText)) ? Color.get_clear() : Color.get_white()); isShowMessage = true; SetLabelText((Enum)UI.LBL_MESSAGE, replaceText); string displayName = npcData.displayName; SetLabelText((Enum)UI.LBL_NAME, displayName); if (message.has_voice) { SoundManager.PlayVoice(message.voice_id, 1f, 0u, null, null); } if (targetTex == UI.TEX_QUEST_NPC) { InitUITweener <TweenColor>((Enum)UI.TEX_QUEST_NPC, true, (EventDelegate.Callback)DeleteModel); InitUITweener <TweenColor>((Enum)UI.SPR_MESSAGE, true, (EventDelegate.Callback)null); } }
public static PlayerAnimCtrl Get(Animator _animator, PLCA default_anim, Action <PlayerAnimCtrl, PLCA> on_play = null, Action <PlayerAnimCtrl, PLCA> on_change = null, Action <PlayerAnimCtrl, PLCA> on_end = null) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) if (_animator == null) { return(null); } InitTable(); PlayerAnimCtrl playerAnimCtrl = _animator.GetComponent <PlayerAnimCtrl>(); if (playerAnimCtrl == null) { playerAnimCtrl = _animator.get_gameObject().AddComponent <PlayerAnimCtrl>(); } playerAnimCtrl.animator = _animator; playerAnimCtrl.onPlay = on_play; playerAnimCtrl.onChange = on_change; playerAnimCtrl.onEnd = on_end; playerAnimCtrl.transitionDuration = 0.1f; playerAnimCtrl.defaultAnim = default_anim; playerAnimCtrl.Play(default_anim, true); return(playerAnimCtrl); }
private IEnumerator DoFreeMove() { while (true) { if (waitTime > 0f) { WaitInFreeMove(); yield return((object)null); } else if (discussionTimer != 0f) { if (discussionTimer < 0f) { if (this is HomeNPCCharacter && homePeople.selfChara != null) { HomeNPCCharacter npc = (HomeNPCCharacter)this; if (npc != null && npc.nearAnim != PLCA.IDLE_01) { Vector2 val = homePeople.selfChara._transform.get_position().ToVector2XZ() - _transform.get_position().ToVector2XZ(); if (val.get_sqrMagnitude() < 9f) { PlayNearAnim(npc); } else if (animCtrl.playingAnim != animCtrl.defaultAnim) { animCtrl.PlayDefault(false); } yield return((object)null); continue; } } if (this is HomePlayerCharacter) { if (Random.Range(0, 10) == 0) { animCtrl.Play(PlayerAnimCtrl.emotionAnims, false); discussionTimer = Random.Range(2f, 4f); } else if (Random.Range(0, 2) == 0) { animCtrl.Play(PlayerAnimCtrl.talkAnims, false); discussionTimer = Random.Range(5f, 10f); } else { animCtrl.PlayIdleAnims(sexType, false); discussionTimer = Random.Range(3f, 6f); } } } else { discussionTimer -= Time.get_deltaTime(); } yield return((object)null); } else { SetupNextWayPoint(); yield return((object)null); if (MonoBehaviourSingleton <HomeManager> .IsValid()) { moveTargetPos = MonoBehaviourSingleton <HomeManager> .I.HomePeople.GetTargetPos(this, wayPoint); } else if (MonoBehaviourSingleton <LoungeManager> .IsValid()) { moveTargetPos = MonoBehaviourSingleton <LoungeManager> .I.HomePeople.GetTargetPos(this, wayPoint); } while (true) { animCtrl.PlayMove(false); Vector3 pos = _transform.get_position(); Vector3 diff = moveTargetPos - pos; Vector2 val2 = diff.ToVector2XZ(); Vector2 dir3 = val2.get_normalized(); Quaternion val3 = Quaternion.LookRotation(dir3.ToVector3XZ()); Vector3 eulerAngles = val3.get_eulerAngles(); float rot2 = eulerAngles.y; float vel2 = 0f; Vector3 eulerAngles2 = _transform.get_eulerAngles(); rot2 = Mathf.SmoothDampAngle(eulerAngles2.y, rot2, ref vel2, 0.1f); _transform.set_eulerAngles(new Vector3(0f, rot2, 0f)); if (diff.get_magnitude() < 0.75f) { break; } yield return((object)null); } if (wayPoint.get_name().StartsWith("LEAF")) { break; } if (wayPoint.get_name().StartsWith("WAIT")) { while (true) { Vector3 eulerAngles3 = wayPoint.get_transform().get_eulerAngles(); float dir2 = eulerAngles3.y; float vel = 0f; Vector3 eulerAngles4 = _transform.get_eulerAngles(); dir2 = Mathf.SmoothDampAngle(eulerAngles4.y, dir2, ref vel, 0.1f); _transform.set_eulerAngles(new Vector3(0f, dir2, 0f)); vel = Mathf.Abs(vel); if (vel > 15f) { animCtrl.Play(PLCA.WALK, false); } else if (!string.IsNullOrEmpty(wayPoint.waitAnimStateName)) { PLCA motion = PlayerAnimCtrl.StringToEnum(wayPoint.waitAnimStateName); animCtrl.Play(motion, false); } else if (this is LoungeMoveNPC) { animCtrl.PlayDefault(false); } else { animCtrl.PlayIdleAnims(sexType, false); } animator.set_applyRootMotion(false); if (vel < 0.01f) { break; } yield return((object)null); } animCtrl.PlayIdleAnims(sexType, false); waitTime = Random.Range(3f, 8f); } else if (wayPoint.get_name() == "CENTER") { waitTime = Random.Range(-3f, 8f); } } } Object.Destroy(this.get_gameObject()); }
protected virtual void OnAnimPlay(PlayerAnimCtrl anim_ctrl, PLCA anim) { animator.set_applyRootMotion((anim == anim_ctrl.moveAnim) ? true : false); }
protected virtual void InitAnim() { animCtrl = PlayerAnimCtrl.Get(animator, (sexType != 0) ? PLCA.IDLE_01_F : PLCA.IDLE_01, OnAnimPlay, null, OnAnimEnd); animCtrl.moveAnim = PLCA.WALK; }
private IEnumerator DoQuestGacha() { m_isSkipAll = false; Init(); SetLinkCamera(true); EnemyLoader[] enemyLoaderList = new EnemyLoader[11]; EnemyTable.EnemyData[] enemy_datas = new EnemyTable.EnemyData[11]; QuestTable.QuestTableData[] quest_datas = new QuestTable.QuestTableData[11]; if (MonoBehaviourSingleton <GachaManager> .IsValid() && MonoBehaviourSingleton <GachaManager> .I.gachaResult != null) { int i = 0; for (int n2 = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward.Count; i < n2; i++) { GachaResult.GachaReward reward = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[i]; uint reward_quest_id = (uint)reward.itemId; quest_datas[i] = Singleton <QuestTable> .I.GetQuestData(reward_quest_id); if (quest_datas[i] != null) { enemy_datas[i] = Singleton <EnemyTable> .I.GetEnemyData((uint)quest_datas[i].GetMainEnemyID()); if (enemy_datas[i] == null) { Log.Error("EnemyTable[{0}] == null", quest_datas[i].GetMainEnemyID()); } } else { Log.Error("QuestTable[{0}] == null", reward.itemId); quest_datas[i] = new QuestTable.QuestTableData(); enemy_datas[i] = new EnemyTable.EnemyData(); } } } NPCLoader npc_loader = LoadNPC(); npc_loader.Load(Singleton <NPCTable> .I.GetNPCData(2).npcModelID, 0, false, true, SHADER_TYPE.NORMAL, null); int n = 0; for (int m = 11; n < m; n++) { float scale = enemy_datas[n].modelScale; int displayAnimID = enemy_datas[n].animId; int modelID = enemy_datas[n].modelId; OutGameSettingsManager.EnemyDisplayInfo displayInfo = MonoBehaviourSingleton <OutGameSettingsManager> .I.SearchEnemyDisplayInfoForGacha(enemy_datas[n]); if (displayInfo != null) { displayAnimID = displayInfo.animID; scale = displayInfo.gachaScale; } enemyLoaderList[n] = LoadEnemy(enemyPositions[n], modelID, displayAnimID, scale, enemy_datas[n].baseEffectName, enemy_datas[n].baseEffectNode); } int l = 0; for (int k = 11; l < k; l++) { while (enemyLoaderList[l].isLoading) { yield return((object)null); } enemyLoaderList[l].ApplyGachaDisplayScaleToParentNode(); CheckAndReplaceShader(enemyLoaderList[l]); enemyLoaderList[l].get_gameObject().SetActive(false); } LoadingQueue lo_queue = new LoadingQueue(this); CacheAudio(lo_queue); for (int j = 0; j < 11; j++) { CacheEnemyAudio(enemy_datas[j], lo_queue); } while (npc_loader.isLoading) { yield return((object)null); } while (lo_queue.IsLoading()) { yield return((object)null); } PlayerAnimCtrl npc_anim = PlayerAnimCtrl.Get(npc_loader.animator, PLCA.IDLE_01, null, null, null); CreateNPCEffect(npc_loader.model); yield return((object)null); stageAnimator.set_cullingMode(0); stageAnimator.Rebind(); stageAnimator.Play("StageAnim_Main"); Play("MainAnim_Start", null, 0f); PlayEffect(startEffectPrefabs[0]); npc_anim.Play(PLCA.QUEST_GACHA, true); PlayAudio(AUDIO.OPENING_01); while (Step(0.5f)) { yield return((object)null); } PlayAudio(AUDIO.OPENING_02); PlayAudio(AUDIO.OPENING_03); while (Step(1.4f)) { yield return((object)null); } PlayAudio(AUDIO.OPENING_04); while (Step(2.6f)) { yield return((object)null); } PlayAudio(AUDIO.DOOR_01); while (Step(3.2f)) { yield return((object)null); } PlayAudio(AUDIO.DOOR_02); while (Step(3.38f)) { yield return((object)null); } PlayAudio(AUDIO.MAGI_INTRO_01); while (Step(5.1f)) { yield return((object)null); } PlayAudio(AUDIO.MAGI_INTRO_02); while (Step(5.5f)) { yield return((object)null); } PlayEffect(startEffectPrefabs[1]); Transform[] magic_effects = (Transform[])new Transform[11]; Transform[] end_effects = (Transform[])new Transform[11]; int meteor_step = 0; int magic_step = 0; int max_step = 11; time -= Time.get_deltaTime(); while (meteor_step < max_step || magic_step < max_step) { time += Time.get_deltaTime(); if (meteor_step < max_step && meteorTimings[meteor_step] <= time) { PlayEffect(magicCircles[meteor_step], meteorEffectPrefabs[quest_datas[meteor_step].rarity.ToRarityExpressionID()]); if (meteor_step == max_step - 1) { PlayAudio(AUDIO.METEOR_01); } meteor_step++; } if (magic_step < max_step && magicTimings[magic_step] <= time) { magic_effects[magic_step] = PlayEffect(magicCircles[magic_step], magicEffectPrefabs[quest_datas[magic_step].rarity.ToRarityExpressionID()]); PlayMagicAudio((int)quest_datas[magic_step].rarity); magic_step++; } yield return((object)null); } int idx = magic_step - 1; if (idx < max_step && idx >= 0) { PlayMagicAudio((int)quest_datas[idx].rarity); } while (Step(13.5f)) { yield return((object)null); } if (skip && !m_isSkipAll) { if (MonoBehaviourSingleton <TransitionManager> .I.isChanging) { yield return((object)null); } Time.set_timeScale(1f); skip = false; time = 13.5f; yield return((object)MonoBehaviourSingleton <TransitionManager> .I.In()); sectionCommandReceiver.ActivateSkipButton(); } ActivateFirstSkipFlag(); int end_step = 0; float end_time2 = 13.5f; float end_step_time = 1.5f; float end_step_time_last = 2f; RARITY_TYPE rarity_type; while (true) { sectionCommandReceiver.OnHideRarity(); PlayAudio(AUDIO.RARITY_EXPOSITION); if (end_step > 0) { int prevIndex = end_step - 1; if (enemyLoaderList[prevIndex] != null) { enemyLoaderList[prevIndex].get_gameObject().SetActive(false); } if (magic_effects[prevIndex] != null) { Object.Destroy(magic_effects[prevIndex].get_gameObject()); magic_effects[prevIndex] = null; } if (end_effects[prevIndex] != null) { Object.Destroy(end_effects[prevIndex].get_gameObject()); end_effects[prevIndex] = null; } } EnemyLoader nowEnemyLoader = enemyLoaderList[end_step]; nowEnemyLoader.get_gameObject().SetActive(true); if (!skip) { string stateName = "Base Layer.GACHA_11"; if (end_step == enemyLoaderList.Length - 1) { stateName = "Base Layer.GACHA_SINGLE"; } PlayEnemyAnimation(nowEnemyLoader, stateName); } rarity_type = quest_datas[end_step].rarity; int effect_rarity = rarity_type.ToRarityExpressionID(); if (rarity_type == RARITY_TYPE.SS) { effect_rarity = 3; } end_effects[end_step] = PlayEffect(magicCircles[end_step], endEffectPrefabs[effect_rarity]); Play($"MainAnim_End_{end_step + 1:D2}", null, 0f); bool is_short = end_step < 11; PlayAppearAudio(rarity_type, is_short); if (enemy_datas.Length > end_step) { PlayEnemyAudio(enemy_datas[end_step], is_short); } end_step++; if (end_step >= 11) { break; } float waitTime = 0f; while (waitTime < showRarityWaitTime) { waitTime += Time.get_deltaTime(); if (base.IsSkipAppearEnemy) { waitTime = showRarityWaitTime; } yield return((object)null); } if (!base.IsSkipAppearEnemy) { sectionCommandReceiver.OnShowRarity(rarity_type); } end_time2 += end_step_time; while (Step(end_time2)) { if (base.IsSkipAppearEnemy) { time = end_time2; } yield return((object)null); } sectionCommandReceiver.ActivateSkipButton(); ResetSkipAppearEnemyFlag(); } yield return((object)new WaitForSeconds(lastShowRarityWaitTime)); sectionCommandReceiver.OnShowRarity(rarity_type); end_time2 += end_step_time_last; while (Step(end_time2)) { yield return((object)null); } if (skip) { while (MonoBehaviourSingleton <TransitionManager> .I.isChanging) { yield return((object)null); } int lastIndex = enemyLoaderList.Length - 1; if (lastIndex >= 0) { PlayEnemyAnimation(enemyLoaderList[lastIndex], "Base Layer.IDLE"); } Time.set_timeScale(1f); if (MonoBehaviourSingleton <TransitionManager> .I.isTransing) { yield return((object)MonoBehaviourSingleton <TransitionManager> .I.In()); } } else { skip = true; } sectionCommandReceiver.OnHideRarity(); Time.set_timeScale(1f); sectionCommandReceiver.OnEnd(); }
private IEnumerator DoInitialize() { if (MonoBehaviourSingleton <InGameRecorder> .IsValid()) { playerRecords = MonoBehaviourSingleton <InGameRecorder> .I.players; int i = 0; while (i < playerRecords.Count) { InGameRecorder.PlayerRecord p = playerRecords[i]; if (p == null || p.playerLoadInfo == null) { playerRecords.RemoveAt(i); } else { i++; } } playersModels = MonoBehaviourSingleton <InGameRecorder> .I.CreatePlayerModels(); while (PlayerLoader.IsLoading(playersModels)) { yield return((object)null); } Transform camera_t = MonoBehaviourSingleton <AppMain> .I.mainCameraTransform; if (MonoBehaviourSingleton <InGameRecorder> .I.isVictory) { int k = 0; for (int j = playersModels.Length; k < j; k++) { PlayerLoader player = playersModels[k]; if (player != null) { player.animator.set_applyRootMotion(false); player.animator.Play("win_loop"); } } camera_t.set_position(camera_t.get_position() + camera_t.get_forward() * 1.5f); } else if (playersModels.Length > 0) { OutGameSettingsManager.QuestResult param = MonoBehaviourSingleton <OutGameSettingsManager> .I.questResult; SoundManager.RequestBGM(10, false); PlayerLoader player_loader = playersModels[0]; if (player_loader != null) { Transform player_t = player_loader.get_transform(); cameraTarget = player_t.get_position() + new Vector3(0f, param.loseCameraHeight, 0f); Vector3 camera_pos = cameraTarget + player_t.get_forward() * param.loseCameraDistance; Quaternion camera_rot = Quaternion.LookRotation(cameraTarget - camera_pos); camera_t.set_position(camera_pos); camera_t.set_rotation(camera_rot); PlayerAnimCtrl.Get(default_anim: (Random.Range(0, 2) != 0) ? PLCA.IDLE_02 : PLCA.IDLE_01, _animator: player_loader.animator, on_play: null, on_change: null, on_end: null); } MonoBehaviourSingleton <AppMain> .I.mainCamera.set_fieldOfView(param.cameraFieldOfView); } } itemsL[0] = GetCtrl(UI.OBJ_ITEM_POS_L_0); itemsL[1] = GetCtrl(UI.OBJ_ITEM_POS_L_1); itemsL[2] = GetCtrl(UI.OBJ_ITEM_POS_L_2); itemsL[3] = GetCtrl(UI.OBJ_ITEM_POS_L_3); itemsR[0] = GetCtrl(UI.OBJ_ITEM_POS_R_0); itemsR[1] = GetCtrl(UI.OBJ_ITEM_POS_R_1); itemsR[2] = GetCtrl(UI.OBJ_ITEM_POS_R_2); itemsR[3] = GetCtrl(UI.OBJ_ITEM_POS_R_3); if (MonoBehaviourSingleton <InGameManager> .IsValid()) { SetActive((Enum)UI.SPR_TITLE, !MonoBehaviourSingleton <InGameManager> .I.IsRush()); SetActive((Enum)UI.SPR_RUSH_TITLE, MonoBehaviourSingleton <InGameManager> .I.IsRush()); } base.Initialize(); }
private IEnumerator DoQuestGacha() { Init(); int display_rarity = 0; SetLinkCamera(true); int enemy_id = 0; EnemyTable.EnemyData enemy_data = null; if (MonoBehaviourSingleton <GachaManager> .I.gachaResult != null) { GachaResult.GachaReward reward = MonoBehaviourSingleton <GachaManager> .I.gachaResult.reward[0]; uint reward_quest_id = (uint)reward.itemId; QuestTable.QuestTableData quest_data = Singleton <QuestTable> .I.GetQuestData(reward_quest_id); if (quest_data != null) { enemy_data = Singleton <EnemyTable> .I.GetEnemyData((uint)quest_data.GetMainEnemyID()); } } if (enemy_data == null) { if (enemy_id == 0) { enemy_id = 1101001; } enemy_data = Singleton <EnemyTable> .I.GetEnemyData((uint)enemy_id); } NPCLoader npc_loader = LoadNPC(); EnemyLoader enemy_loader = null; if (enemy_data != null) { int displayAnimID = enemy_data.animId; OutGameSettingsManager.EnemyDisplayInfo displayInfo = MonoBehaviourSingleton <OutGameSettingsManager> .I.SearchEnemyDisplayInfoForGacha(enemy_data); int modelID = enemy_data.modelId; float displayScale = enemy_data.modelScale; if (displayInfo != null) { displayAnimID = displayInfo.animID; displayScale = displayInfo.gachaScale; } enemy_loader = LoadEnemy(enemyPosition, modelID, displayAnimID, displayScale, enemy_data.baseEffectName, enemy_data.baseEffectNode); while (enemy_loader.isLoading) { yield return((object)null); } enemy_loader.ApplyGachaDisplayScaleToParentNode(); CheckAndReplaceShader(enemy_loader); enemy_loader.get_gameObject().SetActive(false); } while (npc_loader.isLoading) { yield return((object)null); } LoadingQueue lo_queue = new LoadingQueue(this); CacheAudio(lo_queue); if (enemy_data != null) { CacheEnemyAudio(enemy_data, lo_queue); } while (lo_queue.IsLoading()) { yield return((object)null); } PlayerAnimCtrl npc_anim = PlayerAnimCtrl.Get(npc_loader.animator, PLCA.IDLE_01, null, null, null); CreateNPCEffect(npc_loader.model); yield return((object)null); stageAnimator.set_cullingMode(0); stageAnimator.Rebind(); targetRarity = MonoBehaviourSingleton <GachaManager> .I.GetMaxRarity().ToRarityExpressionID() + 1; if (targetRarity > 4) { targetRarity = 4; } stageAnimator.Play("StageAnim_Main"); Play("MainAnim_Start", null, 0f); PlayEffect(startEffectPrefabs[0]); npc_anim.Play(PLCA.QUEST_GACHA, true); bool rankup3 = UpdateDisplayRarity(ref display_rarity); PlayAudio(AUDIO.OPENING_01); while (Step(0.5f)) { yield return((object)null); } PlayAudio(AUDIO.OPENING_02); PlayAudio(AUDIO.OPENING_03); while (Step(1.4f)) { yield return((object)null); } PlayAudio(AUDIO.OPENING_04); while (Step(2.6f)) { yield return((object)null); } PlayAudio(AUDIO.DOOR_01); while (Step(3.2f)) { yield return((object)null); } PlayAudio(AUDIO.DOOR_02); while (Step(3.38f)) { yield return((object)null); } PlayAudio(AUDIO.MAGI_INTRO_01); while (Step(6.5f)) { yield return((object)null); } npc_loader.get_gameObject().SetActive(false); PlayMeteorEffect(display_rarity); PlayAudio(AUDIO.METEOR_01); while (Step(7.5f)) { yield return((object)null); } PlayMagicEffect(display_rarity, rankup3); PlayMagicAudio(display_rarity); rankup3 = UpdateDisplayRarity(ref display_rarity); PlayMeteorEffect(display_rarity); while (Step(8.5f)) { yield return((object)null); } PlayMagicEffect(display_rarity, rankup3); PlayMagicAudio(display_rarity); rankup3 = UpdateDisplayRarity(ref display_rarity); PlayMeteorEffect(display_rarity); PlayAudio(AUDIO.METEOR_02); while (Step(9.5f)) { yield return((object)null); } PlayMagicEffect(display_rarity, rankup3); PlayMagicAudio(display_rarity); while (Step(10.5f)) { yield return((object)null); } if (enemy_loader != null) { enemy_loader.get_gameObject().SetActive(true); } if (!skip) { PlayEnemyAnimation(enemy_loader, "Base Layer.GACHA_SINGLE"); } Play("MainAnim_End", null, 0f); UpdateDisplayRarity(ref display_rarity); PlayEndEffect(display_rarity); RARITY_TYPE rarity = MonoBehaviourSingleton <GachaManager> .I.GetMaxRarity(); PlayAppearAudio(rarity, false); if (enemy_data != null) { PlayEnemyAudio(enemy_data, false); } while (Step(11.5f)) { yield return((object)null); } while (Step(13f)) { yield return((object)null); } if (skip) { while (MonoBehaviourSingleton <TransitionManager> .I.isChanging) { yield return((object)null); } PlayEnemyAnimation(enemy_loader, "Base Layer.IDLE"); Time.set_timeScale(1f); if (MonoBehaviourSingleton <TransitionManager> .I.isTransing) { yield return((object)MonoBehaviourSingleton <TransitionManager> .I.In()); } } else { skip = true; } Time.set_timeScale(1f); sectionCommandReceiver.OnEnd(); }
protected void InitAnim() { PLCA default_anim = PLCA.IDLE_02; animCtrl = PlayerAnimCtrl.Get(animator, default_anim, null, null, null); }