Exemplo n.º 1
0
    System.Action normalAct;                         //카메라가 노멀로 돌아온 후에 띄워주기 위해서.
    public void CamToPosNormal(System.Action action) //1
    {
        normalAct = new System.Action(action);

        QuestRoomSceneUIManager.GetInstance().HideAllUI();
        mainCameraAnimator.SetTrigger("cameraToNormalPos");
    }
    public void CharactorLeave(E_Charactor charactor)
    {
        QuestRoomSceneUIManager.GetInstance().OnlyShowMainUIOrigin();
        Stack <FSMState> stateStack = CharactorFrame.GetInstance().CharaController.GetStateStack();
        CharactorIdea    nowChara;

        //여기가 너무 안좋은데.
        switch (charactor)
        {
        case E_Charactor.CLIENT:
            nowChara = CharactorFrame.GetInstance().clientIdea;

            if (stateStack.Contains(ClientFSMFactory.GetInstance().GetState(E_ClientState.COMMISSION_CANCEL)))
            {
                CharactorManager.GetInstance().RemoveCharactor(nowChara);
                break;
            }
            if (stateStack.Contains(ClientFSMFactory.GetInstance().GetState(E_ClientState.CHECK_IMPERFACT_00))
                ||
                stateStack.Contains(ClientFSMFactory.GetInstance().GetState(E_ClientState.CHECK_IMPERFACT_50))
                ||
                stateStack.Contains(ClientFSMFactory.GetInstance().GetState(E_ClientState.CHECK_IMPERFACT_80))
                ||
                stateStack.Contains(ClientFSMFactory.GetInstance().GetState(E_ClientState.CHECK_IMPERFACT_95))
                ||
                stateStack.Contains(ClientFSMFactory.GetInstance().GetState(E_ClientState.CHECK_PERFACT))
                )
            {
                ClientCommissionCheckCalculateLastincome();
                CharactorManager.GetInstance().RemoveCharactor(nowChara);
            }

            break;

        case E_Charactor.HUNTER:
            nowChara = CharactorFrame.GetInstance().hunterIdea;

            if (stateStack.Contains(HunterFSMFactory.GetInstance().GetState(E_HunterState.INQUIRE_QUEST_CANCEL)))
            {
                CharactorManager.GetInstance().RemoveCharactor(nowChara);
                break;
            }
            if (stateStack.Contains(HunterFSMFactory.GetInstance().GetState(E_HunterState.HUNT_REWARD_ALL_PAYMENT))
                ||
                stateStack.Contains(HunterFSMFactory.GetInstance().GetState(E_HunterState.HUNT_REWARD_PARTIAL_PAYMENT))
                ||
                stateStack.Contains(HunterFSMFactory.GetInstance().GetState(E_HunterState.HUNT_REWARD_DENIED))
                )
            {
                CharactorManager.GetInstance().RemoveCharactor(nowChara);
                break;
            }
            break;
        }
        CharactorFrame.GetInstance().LeaveAnim();
        Debug.Log("캐릭터 리브");
    }
    public void HunterRewardSubmit(int payment) //그냥 eps 처리를 이 단에서 해주려고 한거.
    {
        //완전지불 버튼이면 0 , 부분지불 버튼이면 1 , 거부면 2
        //버튼에서 인자 확실하게 넘겨줄것!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
        EventParameterStorage.GetInstance().PlayerMultipleChoice = payment;

        QuestRoomSceneUIManager.GetInstance().OnlyShowMainUIOrigin();

        CharactorFrame.GetInstance().UpdateFSM();
    }
    public void CheckCommissionUIShow()  //그 퀘스트 체크 유아이 띄우고
    //완성도 반환
    {
        Quest writtenQuest = QuestManager.GetInstance().GetQuest(
            CharactorFrame.GetInstance().clientIdea.associatedQuestKey
            );

        QuestRoomSceneUIManager.GetInstance().OnlyShowQCUI();
        QuestCheckManager.GetInstance().InitQCCanvas(writtenQuest);
    }
    public void HunterInquireQuestSubmit(string Qkey, bool didDetermined, List <Weapon> rentalSelected) //헌터에게 퀘스트를 맡기고 렌탈등과 퀘스트 등과 선택 했을 때.
    {
        if (!didDetermined)                                                                             //ui에서 제출이면 true 인자로 넣어서 보내주기!
        {
            EventParameterStorage.GetInstance().PlayerChoice = false;
            CharactorFrame.GetInstance().UpdateFSM();
            return;
        }

        EventParameterStorage.GetInstance().PlayerChoice = true;
        HunterIdea hunter        = CharactorFrame.GetInstance().hunterIdea;
        Quest      selectedQuest = QuestManager.GetInstance().GetQuest(Qkey);

        //본래 퀘스트의 만기보다 하루 빨리. 그리고 10시~ 17시 사이를 랜덤으로 지정.
        InGameTime dayOneMinus  = InGameTime.GetOnlyOneDayMinus(selectedQuest.ExpireDate);
        uint       hour         = (uint)Random.Range(Constant.dayStartHour, Constant.dayEndHour - 1);
        InGameTime hunterExpire = new InGameTime(dayOneMinus.Year, dayOneMinus.Month, dayOneMinus.Day, hour, 0);

        hunter.SetHasCommission(Qkey);
        hunter.SetHuntExpireDay(hunterExpire);

        if (rentalSelected != null)
        {
            //렌탈 처리 해주기.
            hunter.SetRentalTheseWeapon(rentalSelected);
            Inventory.GetInstance().RemoveWeaponsFromInven(rentalSelected);//렌탈해간 물건들 인벤에서 뺴주는 처리.
        }

        WholeMonsterRiskManager.GetInstance().AddHunter(hunter);    //수임을 받은날 위협도 매니져에서 일함.(그 날의 데이오프 부터)

        QuestRoomSceneUIManager.GetInstance().OnlyShowMainUIOrigin();

        int deposit = PayFormula.CalculateHuntDeposit(selectedQuest, hunter.GetHunterExpireGap());   //헌터 착수금 지불.

        GoldManager.GetInstance().AdjustGold(-1 * deposit, GoldManager.E_PayType.TO_HUNTER);

        CharactorFrame.GetInstance().UpdateFSM();
    }
 public void ShowTalk(string charaText, params string[] playerText)
 {
     QuestRoomSceneUIManager.GetInstance().OnlyShowMainUITalk();
     MainUIManager.GetInstance().SetCharaText(charaText);
     if (playerText.Length == 1)
     {
         //  Debug.Log("인터렉티브 매니져 - 쇼토크" + charaText + playerText[0]);
         MainUIManager.GetInstance().ShowPlayerText1Btn(playerText[0]);
     }
     else if (playerText.Length == 2)
     {
         //  Debug.Log("인터렉티브 매니져 - 쇼토크" + charaText + playerText[0] + playerText[1]);
         MainUIManager.GetInstance().ShowPlayerText2Btn(playerText[0], playerText[1]);
     }
     else
     {
         string result = "";
         foreach (string str in playerText)
         {
             result += str + "/";
         }
         Debug.Log("쇼토크 에러" + result);
     }
 }
Exemplo n.º 7
0
 private void Start()
 {
     QuestRoomSceneUIManager.GetInstance().OnlyShowMainUIOrigin();
     goldText.text = GoldManager.GetInstance().Gold.ToString();
     GoldManager.GetInstance().AddGoldChangeListner(GoldCountShow);
 }
 public void EndOfComeAnimation()
 {
     QuestRoomSceneUIManager.GetInstance().OnlyShowMainUIOrigin();
     MainUIManager.GetInstance().SetCharaNameText(CharactorFrame.GetInstance().CharaName);
     CharactorFrame.GetInstance().UpdateFSM();
 }
Exemplo n.º 9
0
 public void PosToNormalEnd()
 {
     QuestRoomSceneUIManager.GetInstance().OnlyShowMainUIOrigin();
     normalAct();
 }
Exemplo n.º 10
0
 public void CamToPosNormal()    //1
 {
     QuestRoomSceneUIManager.GetInstance().HideAllUI();
     mainCameraAnimator.SetTrigger("cameraToNormalPos");
 }
Exemplo n.º 11
0
 public void PosToMakingEnd()    //1
 {
     //퀘스트 메이킹 ui 띄워주기?
     QuestRoomSceneUIManager.GetInstance().OnlyShowQMUI();
 }
Exemplo n.º 12
0
 public void CamToPosMaking()    //1
 {
     QuestRoomSceneUIManager.GetInstance().HideAllUI();
     mainCameraAnimator.SetTrigger("cameraToQuestMaking");
 }
 public void HunterInquireQuest()
 {
     QuestRoomSceneUIManager.GetInstance().OnlyShowHIQUI();
 }
 public void HunterRewardUIShow()
 {
     //의뢰했던 퀘스트랑 헌터가 가져온 의뢰품들이랑 비교 ui 보여줌,
     //그 지불 방식 버튼 3개 나오도록.
     QuestRoomSceneUIManager.GetInstance().OnlyShowHRUI();
 }