private static void TestTransitionAnim(Transform ui, GameSceneTables.SectionData section_data) { if (!(section_data == (GameSceneTables.SectionData)null) && section_data.type != 0 && !(section_data.sectionName == "InGameMain")) { SetDefaultTransitionAnim(ui, section_data.type != GAME_SECTION_TYPE.SCREEN); } }
public int GetDialogDialogBlockerDepth(GameSceneTables.SectionData new_section_data) { HierarchyData hierarchyData = null; if (new_section_data != (GameSceneTables.SectionData)null && new_section_data.type.IsDialog()) { hierarchyData = Find(new_section_data); if (hierarchyData != null) { return(hierarchyData.section.baseDepth - 2); } hierarchyData = GetOpendLast(); if (hierarchyData != null && hierarchyData.data.type.IsDialog()) { return(hierarchyData.section.baseDepth - 2); } return(3002); } hierarchyData = GetOpendLast(); if (hierarchyData != null && hierarchyData.data.type.IsDialog()) { return(hierarchyData.section.baseDepth - 2); } return(-1); }
private IEnumerator UpdateNPCTalkingAfterBreakedBariier() { GameSceneTables.SectionData sectionData = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSection().sectionData; Player hound_A = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[0] as Player; Player hound_B = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[1] as Player; Player beginner = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[2] as Player; hound_B.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_9")); yield return((object)new WaitForSeconds(4f)); hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_10")); yield return((object)new WaitForSeconds(4f)); beginner.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_11")); yield return((object)new WaitForSeconds(20f)); hound_B.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_12")); EnemyBrain brain = enemy.GetComponentInChildren <EnemyBrain>(); for (int i = 0; i < brain.actionCtrl.actions.Count; i++) { brain.actionCtrl.actions[i].isForceDisable = (i != 14); finish = true; } yield return((object)new WaitForSeconds(5f)); hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_13")); yield return((object)null); }
public void CheckSmithSectionBlur(string scene_name, string section_name, GameSceneTables.SectionData section_data) { if (!section_data.type.IsDialog()) { switch (section_name) { case "SmithGrowItemSelect": case "SmithGrow": case "SmithCreateItemSelect": case "SmithCreateItem": if (MonoBehaviourSingleton <FilterManager> .IsValid() && !MonoBehaviourSingleton <FilterManager> .I.IsEnabledBlur()) { EnableSmithBlur(); } break; default: if (MonoBehaviourSingleton <FilterManager> .IsValid() && MonoBehaviourSingleton <FilterManager> .I.IsEnabledBlur() && section_name != "StatusToSmith") { DisableSmithBlur(scene_name != "SmithScene"); } break; } } }
public void UpdateMessage(GameSceneTables.SectionData section_data, bool is_open) { if (!(section_data != (GameSceneTables.SectionData)null) || section == null || !(section.name == section_data.sectionName)) { if (!is_open) { Close(UITransition.TYPE.CLOSE); } else { int baseDepth = 100; section = Singleton <NPCMessageTable> .I.GetSection(section_data.sectionName); if (section == null) { HomeNPCTalk homeNPCTalk = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSection() as HomeNPCTalk; if (homeNPCTalk != null) { section = Singleton <NPCMessageTable> .I.GetSection($"{section_data.sectionName}_{homeNPCTalk.npcID:D3}"); baseDepth = homeNPCTalk.baseDepth + 1; } if (section == null) { return; } } base.baseDepth = baseDepth; message = section.GetNPCMessage(); LoadModel(); } } }
public string GetNPCMessageBySectionData(GameSceneTables.SectionData sectionData) { Section section = GetSection(sectionData.sectionName + "_TEXT"); if (section != null) { return(section.GetNPCMessage()?.message); } return(sectionData.GetText("NPC_MESSAGE_" + Random.Range(0, 3))); }
public void UpdateCamera(string scene_name, string section_name, GameSceneTables.SectionData section_data) { if (!section_data.type.IsDialog()) { VIEW_TYPE vIEW_TYPE = viewType; vIEW_TYPE = ((scene_name == "StatusScene" && section_name != "StatusToSmith" && section_name != "ItemStorageSell" && !section_name.Contains("Exchange")) ? VIEW_TYPE.STATUS : VIEW_TYPE.SMITH); if (viewType != vIEW_TYPE) { MoveCamera(viewType, vIEW_TYPE, viewMode, viewMode); viewType = vIEW_TYPE; } } }
public HierarchyData Find(GameSceneTables.SectionData section_data) { int i = 0; for (int count = hierarchyList.Count; i < count; i++) { if (hierarchyList[i].data == section_data) { return(hierarchyList[i]); } } return(null); }
public HierarchyData FindIgnoreSingle(GameSceneTables.SectionData section_data) { int i = 0; for (int count = hierarchyList.Count; i < count; i++) { HierarchyData hierarchyData = hierarchyList[i]; if (hierarchyData.data == section_data && !hierarchyData.data.type.IsSingle()) { return(hierarchyData); } } return(null); }
private IEnumerator UpdateNPCTalking() { GameSceneTables.SectionData sectionData = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSection().sectionData; yield return((object)new WaitForSeconds(5f)); Player hound_A = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[0] as Player; Player hound_B = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[1] as Player; Player beginner = MonoBehaviourSingleton <StageObjectManager> .I.nonplayerList[2] as Player; hound_A.uiPlayerStatusGizmo.SetChatDuration(4f); hound_B.uiPlayerStatusGizmo.SetChatDuration(4f); beginner.uiPlayerStatusGizmo.SetChatDuration(4f); beginner.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_0")); yield return((object)new WaitForSeconds(5f)); hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_1")); yield return((object)new WaitForSeconds(10f)); hound_B.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_2")); yield return((object)new WaitForSeconds(4f)); hound_B.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_3")); yield return((object)new WaitForSeconds(6f)); beginner.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_4")); yield return((object)new WaitForSeconds(4f)); hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_5")); yield return((object)new WaitForSeconds(10f)); hound_B.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_6")); yield return((object)new WaitForSeconds(5f)); hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_7")); yield return((object)new WaitForSeconds(4f)); hound_A.uiPlayerStatusGizmo.SayChat(sectionData.GetText("STR_VORGON_HINT_8")); yield return((object)new WaitForSeconds(4f)); if ((int)enemy.BarrierHp > 1) { enemy.BarrierHp = 1; } vorgonBarrierBrokenProc = true; }
public void UpdateDialogBlocker(GameSectionHierarchy hierarchy, GameSceneTables.SectionData new_section_data) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Expected O, but got Unknown GameObject blocker = system.GetCtrl(SYSTEM.DIALOG_BLOCKER).get_gameObject(); int dialogDialogBlockerDepth = hierarchy.GetDialogDialogBlockerDepth(new_section_data); int num = 3000; if (dialogDialogBlockerDepth > -1) { blocker.SetActive(true); dialogBlockerTween.SetOnFinished((EventDelegate.Callback)null); dialogBlockerTween.PlayForward(); blocker.GetComponent <UIPanel>().depth = dialogDialogBlockerDepth; } else { dialogBlockerTween.SetOnFinished(delegate { blocker.SetActive(false); }); dialogBlockerTween.PlayReverse(); if (blocker.get_activeSelf()) { num = -1; } } if (num > -1) { if (mainMenu != null) { mainMenu.baseDepth = num; } if (mainStatus != null) { mainStatus.baseDepth = num; } } }
public GameSection CreateSection(GameSceneTables.SectionData section_data, LoadObject[] use_objects) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown GameSection gameSection = null; HierarchyData last = GetLast(); Transform parent = (last != null) ? last.section._transform : MonoBehaviourSingleton <UIManager> .I.uiCamera.get_transform(); if (section_data.type == GAME_SECTION_TYPE.COMMON_DIALOG) { gameSection = (Utility.CreateGameObjectAndComponent(section_data.typeParams[0], parent, 5) as GameSection); gameSection.baseDepth = GetPrefabUIDepth(section_data.type); gameSection.set_name(section_data.sectionName); parent = gameSection._transform; } int i = 0; for (int num = use_objects.Length; i < num; i++) { LoadObject loadObject = use_objects[i]; if (loadObject != null) { GameObject val = loadObject.loadedObject as GameObject; if (val != null) { if (val.GetComponent <UIVirtualScreen>() != null) { Type type = null; if (gameSection == null) { type = Type.GetType(section_data.sectionName); } UIBehaviour uIBehaviour = UIManager.CreatePrefabUI(val, loadObject.PopInstantiatedGameObject(), type, false, parent, GetPrefabUIDepth(section_data.type), section_data); if (gameSection == null && section_data.type == GAME_SECTION_TYPE.COMMON_DIALOG) { gameSection = (uIBehaviour.get_gameObject().AddComponent(Type.GetType(section_data.typeParams[0])) as GameSection); parent = gameSection._transform; } else if (gameSection == null && type != null) { gameSection = (uIBehaviour.GetComponent <UIBehaviour>() as GameSection); parent = gameSection._transform; } else { if (gameSection == null) { gameSection = (uIBehaviour.GetComponent <UIBehaviour>() as GameSection); } if (gameSection == null) { gameSection = (Utility.CreateGameObjectAndComponent(section_data.sectionName, parent, 5) as GameSection); gameSection.baseDepth = GetPrefabUIDepth(section_data.type); parent = gameSection._transform; } if (section_data.type != GAME_SECTION_TYPE.COMMON_DIALOG) { uIBehaviour.Open(UITransition.TYPE.OPEN); } } } else if (gameSection != null) { gameSection.AddPrefab(val, loadObject.PopInstantiatedGameObject()); } else { Log.Warning(LOG.GAMESCENE, "[{0}] is not used.", val.get_name()); } } } } if (gameSection == null) { gameSection = (Utility.CreateGameObjectAndComponent(section_data.sectionName, parent, 5) as GameSection); gameSection.baseDepth = GetPrefabUIDepth(section_data.type); } HierarchyData hierarchyData = new HierarchyData(); hierarchyData.section = gameSection; hierarchyData.data = section_data; hierarchyList.Add(hierarchyData); int type2 = (int)section_data.type; if (typedDatas[type2] == null) { typedDatas[type2] = hierarchyData; } return(gameSection); }
public static UIBehaviour CreatePrefabUI(Object prefab, GameObject inactive_inctance, Type add_component_type, bool initVisible, Transform parent, int depth, GameSceneTables.SectionData section_data) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_00bb: Unknown result type (might be due to invalid IL or missing references) if (parent == null && MonoBehaviourSingleton <UIManager> .IsValid()) { parent = MonoBehaviourSingleton <UIManager> .I._transform; } string text = prefab.get_name(); if (text.StartsWith("internal__")) { text = text.Substring(text.LastIndexOf("__") + 2); } Transform val = Utility.CreateGameObject(text, parent, 5); val.get_gameObject().AddComponent <UIPanel>(); Transform val2 = null; val2 = ((!(inactive_inctance != null)) ? ResourceUtility.Realizes(prefab, val, 5) : InstantiateManager.Realizes(ref inactive_inctance, val, 5)); if (add_component_type == null) { add_component_type = Type.GetType(val2.get_name()); } UIBehaviour uIBehaviour = (add_component_type == null) ? val.get_gameObject().AddComponent <UIBehaviour>() : (val.get_gameObject().AddComponent(add_component_type) as UIBehaviour); uIBehaviour.collectUI = val2; uIBehaviour.sectionData = section_data; TestTransitionAnim(val2, section_data); if (MonoBehaviourSingleton <UIManager> .I.common != null) { int num = 0; string text2 = uIBehaviour.GetCaptionText(); if (section_data != (GameSceneTables.SectionData)null) { if (text2 == null) { text2 = section_data.GetText("CAPTION"); } num = section_data.backButtonIndex; } if (num > 0) { MonoBehaviourSingleton <UIManager> .I.common.AttachBackButton(uIBehaviour, num - 1); } MonoBehaviourSingleton <UIManager> .I.common.AttachCaption(uIBehaviour, num, text2); } uIBehaviour.InitUI(); uIBehaviour.baseDepth = depth; if (!initVisible) { val2.GetComponentsInChildren <UIWidget>(Temporary.uiWidgetList); int i = 0; for (int count = Temporary.uiWidgetList.Count; i < count; i++) { Temporary.uiWidgetList[i]._Update(); } Temporary.uiWidgetList.Clear(); } uIBehaviour.uiVisible = initVisible; return(uIBehaviour); }