Пример #1
0
    public void NpcClickEvent()
    {
        TownPanel panel = UIMgr.GetTownBasePanel() as TownPanel;

        if (panel == null || panel.IsHideTown)//무시
        {
            return;
        }

        MyTownUnit myHero = SceneManager.instance.GetState <TownState>().MyHero;

        if (myHero == null || myHero.IsMiniMapMove)//미니맵으로 온것의 경우 그냥 무시한다.
        {
            return;
        }

        //퀘스트 NPC
        if ((NPCTYPE)NPCType == NPCTYPE.QUEST_NPC)
        {
            Quest.QuestInfo info = QuestManager.instance.CheckSubQuest(QuestSubType.NPCTALK, (uint)NpcId);
            if (info != null && 0 < info.QuestTalkSceneID)
            {
                UIMgr.OpenMissionPanel(info.ID);
            }
        }
        //else if ((NPCTYPE)NPCType == NPCTYPE.ARENA_NPC)
        //{
        //    GameObject townpanel = UIMgr.GetUI("UIPanel/TownPanel");
        //    townpanel.GetComponent<TownPanel>().Hide();
        //    UIMgr.OpenArenaPanel();
        //}
        //else if ((NPCTYPE)NPCType == NPCTYPE.SPECIAL_NPC)
        //{
        //    panel.Hide();
        //    UIMgr.OpenSpecial();
        //}
        //else if ((NPCTYPE)NPCType == NPCTYPE.FREEFIGHT_NPC)
        //{
        //    panel.Hide();
        //    UIMgr.OpenDogFight();
        //}
        //else if ((NPCTYPE)NPCType == NPCTYPE.TOWER_NPC)
        //{
        //    panel.Hide();
        //    UIMgr.OpenTowerPanel();
        //}
        //else if ((NPCTYPE)NPCType == NPCTYPE.COSTUME_NPC)
        //{
        //    panel.Hide();
        //    UIMgr.OpenCostume();
        //}
        else if ((NPCTYPE)NPCType == NPCTYPE.SINGLE_NPC)
        {
            //모험모드 NPC
            //UIMgr.instance.UiOpenType = UI_OPEN_TYPE.NONE;
            SceneManager.instance.UiOpenType = UI_OPEN_TYPE.NONE;
            GameObject townpanel = UIMgr.GetUI("UIPanel/TownPanel");
            townpanel.GetComponent <TownPanel>().OpenChapter();
        }

        //진행중인 퀘스트가 있는지 체크해야됨
        myHero.ResetMoveTarget();
    }
Пример #2
0
 public void SetTownPanel(TownPanel panel)
 {
     TownPanelScript = panel;
 }