示例#1
0
        public void GoToQuest(QuestStep p_step)
        {
            Int32 p_tabID = 0;

            for (Int32 i = 0; i < m_questTabController.Tabs.Length; i++)
            {
                QuestTabInfo component = m_questTabController.Tabs[i].GetComponent <QuestTabInfo>();
                if (component != null && component.QuestType == p_step.StaticData.Type)
                {
                    p_tabID = i;
                }
            }
            if (p_step.QuestState == EQuestState.SOLVED)
            {
                if (!m_showFinished.isChecked)
                {
                    SetShowFinished(true);
                }
                else
                {
                    UpdateEntries(p_step.StaticData.Type);
                }
            }
            m_questTabController.SelectTab(p_tabID, false);
            QuestClick(p_step, EventArgs.Empty);
        }
示例#2
0
        public void GoToTokens()
        {
            Int32 p_tabID = 0;

            for (Int32 i = 0; i < m_questTabController.Tabs.Length; i++)
            {
                QuestTabInfo component = m_questTabController.Tabs[i].GetComponent <QuestTabInfo>();
                if (component == null && m_questTabController.Tabs[i].name.ToLower().Contains("tokens"))
                {
                    p_tabID = i;
                    break;
                }
            }
            m_questTabController.SelectTab(p_tabID, false);
        }
示例#3
0
        private void OnQuestTabIndexChanged(Object sender, EventArgs e)
        {
            Tab          tab       = m_questTabController.Tabs[m_questTabController.CurrentTabIndex];
            QuestTabInfo component = tab.GetComponent <QuestTabInfo>();

            if (component == null)
            {
                m_headerLabel.text = LocaManager.GetText("TT_QUEST_TOKENS");
                m_tokenPanel.Show();
                NGUITools.SetActive(m_showFinished.gameObject, false);
                NGUITools.SetActive(m_detailsPanel.gameObject, false);
                NGUITools.SetActive(m_pageableList.gameObject, false);
                return;
            }
            m_tokenPanel.Hide();
            NGUITools.SetActive(m_showFinished.gameObject, true);
            NGUITools.SetActive(m_detailsPanel.gameObject, true);
            NGUITools.SetActive(m_pageableList.gameObject, true);
            EQuestType questType = component.QuestType;

            switch (questType)
            {
            case EQuestType.QUEST_TYPE_MAIN:
                m_headerLabel.text = LocaManager.GetText("TT_QUEST_MAIN");
                break;

            default:
                if (questType != EQuestType.ALL)
                {
                    m_headerLabel.text = String.Empty;
                }
                else
                {
                    m_headerLabel.text = LocaManager.GetText("TT_QUEST_ALL");
                }
                break;

            case EQuestType.QUEST_TYPE_SIDE:
                m_headerLabel.text = LocaManager.GetText("TT_QUEST_SIDE");
                break;

            case EQuestType.QUEST_TYPE_ONGOING:
                m_headerLabel.text = LocaManager.GetText("TT_QUEST_ONGOING");
                break;
            }
            UpdateEntries(component.QuestType);
        }