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(); } } }
private IEnumerator TimeCountDown() { UILabel timeLbl = GetCtrl(UI.LBL_TIME_COUNT).GetComponent <UILabel>(); if (string.IsNullOrEmpty(GameSaveData.instance.resetMarketTime)) { timeLbl.color = Color.get_red(); timeLbl.text = "00:00:00"; } else { timeResetMarket = (int)GoGameTimeManager.GetRemainTime(GameSaveData.instance.resetMarketTime).TotalSeconds; for (currentNPCMessageIndex = 0; timeResetMarket > 3600; timeResetMarket = (int)GoGameTimeManager.GetRemainTime(GameSaveData.instance.resetMarketTime).TotalSeconds) { timeLbl.text = UIUtility.TimeFormat(timeResetMarket, true); yield return((object)new WaitForSeconds(0.25f)); } timeLbl.color = Color.get_red(); currentNPCMessageIndex = 1; NPCMessageTable.Section npc_messgae = Singleton <NPCMessageTable> .I.GetSection(base.sectionData.sectionName + "_TEXT"); if (npc_messgae != null) { NPCMessageTable.Message message = npc_messgae.messages[currentNPCMessageIndex]; if (message != null) { SetLabelText((Enum)UI.LBL_NPC_MESSAGE, message.message); } } while (timeResetMarket > 0) { timeLbl.text = SecondToTime(timeResetMarket); yield return((object)new WaitForSeconds(0.25f)); timeResetMarket = (int)GoGameTimeManager.GetRemainTime(GameSaveData.instance.resetMarketTime).TotalSeconds; } yield return((object)null); MonoBehaviourSingleton <UIManager> .I.blackMarkeButton.Close(UITransition.TYPE.CLOSE); yield return((object)this.StartCoroutine(_DoCloseDialog())); GameSection.BackSection(); } }
private void _updateNPC() { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) NPCMessageTable.Section section = Singleton <NPCMessageTable> .I.GetSection(base.sectionData.sectionName + "_TEXT"); if (section != null) { NPCMessageTable.Message message = section.GetNPCMessage(); if (message != null) { SetRenderNPCModel((Enum)UI.TEX_NPCMODEL, message.npc, message.pos, message.rot, MonoBehaviourSingleton <OutGameSettingsManager> .I.homeScene.questCenterNPCFOV, (Action <NPCLoader>) delegate(NPCLoader loader) { loader.GetAnimator().Play(message.animationStateName); }); } } }
protected void UpdateNPC() { //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Unknown result type (might be due to invalid IL or missing references) string empty = string.Empty; NPCMessageTable.Section section = Singleton<NPCMessageTable>.I.GetSection(base.sectionData.sectionName + "_TEXT"); if (section != null) { NPCMessageTable.Message message = section.GetNPCMessage(); if (message != null) { empty = message.message; SetRenderNPCModel((Enum)UI.TEX_NPCMODEL, message.npc, message.pos, message.rot, MonoBehaviourSingleton<OutGameSettingsManager>.I.homeScene.questCenterNPCFOV, (Action<NPCLoader>)delegate(NPCLoader loader) { loader.GetAnimator().Play(message.animationStateName); }); SetLabelText((Enum)UI.LBL_NPC_MESSAGE, empty); } } }
private void SetNPCMessage(UI tab) { if (!isInGameScene) { string str = string.Empty; switch (tab) { case UI.BTN_TAB_NORMAL: str = ((!MonoBehaviourSingleton <DeliveryManager> .I.IsExistDelivery(TAB_TYPES[0])) ? "_COMPLETE" : string.Empty); break; case UI.BTN_TAB_DAILY: str = ((!MonoBehaviourSingleton <DeliveryManager> .I.IsExistDelivery(TAB_TYPES[1])) ? "_COMPLETE" : "_DAILY"); break; case UI.BTN_TAB_WEEKLY: str = ((!MonoBehaviourSingleton <DeliveryManager> .I.IsExistDelivery(TAB_TYPES[2])) ? "_COMPLETE" : "_WEEKLY"); break; } NPCMessageTable.Section section = Singleton <NPCMessageTable> .I.GetSection(base.sectionData.sectionName + str + "_TEXT"); if (section != null) { NPCMessageTable.Message nPCMessage = section.GetNPCMessage(); if (nPCMessage != null) { npcText = nPCMessage.GetReplaceText(); } } else { npcText = base.sectionData.GetText("NPC_MESSAGE_" + Random.Range(0, 3)); } SetLabelText((Enum)UI.LBL_NPC_MESSAGE, npcText); } }