Ejemplo n.º 1
0
    public void ShowTouchButton(CQuest quest)
    {
        if (quest == null)
        {
            return;
        }
        this.m_kQuest = quest;
        NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1);

        if (charPersonInfo == null)
        {
            return;
        }
        int level = charPersonInfo.GetLevel(0L);

        if (3 >= level)
        {
            if ("10101_005" == quest.GetQuestUnique())
            {
                return;
            }
            QUEST_CONST.eQUESTSTATE questState = NrTSingleton <NkQuestManager> .Instance.GetQuestState(quest.GetQuestUnique());

            if ((null == this.m_Touch && quest.IsAutoMoveQuest()) || questState == QUEST_CONST.eQUESTSTATE.QUESTSTATE_COMPLETE)
            {
                if (null != this.m_Touch)
                {
                    return;
                }
                this.m_Touch = UICreateControl.Button("touch", "Main_I_Touch01", 196f, 154f);
                this.m_Touch.PlayAni(true);
                base.InteractivePanel.MakeChild(this.m_Touch.gameObject);
                this.m_Touch.SetLocation(-this.m_Touch.GetSize().x + 85f, 0f, this.m_kQuestList.GetLocation().z - 1f);
                BoxCollider component = this.m_Touch.gameObject.GetComponent <BoxCollider>();
                if (null != component)
                {
                    UnityEngine.Object.Destroy(component);
                }
            }
        }
        else
        {
            if (null != this.m_Touch)
            {
                base.InteractivePanel.RemoveChild(this.m_Touch.gameObject);
                UnityEngine.Object.Destroy(this.m_Touch.gameObject);
            }
            this.m_kQuest = null;
        }
    }