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("캐릭터 리브");
    }
    CharactorIdea GambleGetNewbie()
    {
        bool makeNewbie = (Random.Range(0, 2) == 1) ? makeNewbie = true : makeNewbie = false;

        E_Charactor charaType = (E_Charactor)(Random.Range(0, (int)E_Charactor.MAX));

        if (QuestManager.GetInstance().QuestDic.Count == 0) //현재 퀘스트가 한 개도 없으면 확정으로 클라이언트 생성.
        {
            charaType  = E_Charactor.CLIENT;
            makeNewbie = true;
        }

        if (!makeNewbie)
        {
            return(null);               //캐릭터를 새로 생성 안하는 경우도 있음.
        }
        string charaName = TextManager.GetInstance().GetNewbieName();

        CharactorIdea newbie    = null;
        int           spriteNum = Random.Range(0, SpriteManager.GetInstance().charactorSprites.Length); //캐릭터 스프라이트는... 그냥 랜덤으로...

        switch (charaType)
        {
        case E_Charactor.CLIENT:
            newbie = new ClientIdea(spriteNum, charaName);
            break;

        case E_Charactor.HUNTER:
            float nowQuestsAverageCap = Mathf.Floor(QuestManager.GetInstance().GetAverageQuestCap());
            //현재 퀘스트에 올라온 평균 능력치의 절반 부터 평균치의 1~2.5배 능력치 중에서 랜덤
            float hunterCap = Mathf.Floor(Random.Range(
                                              nowQuestsAverageCap / 2,
                                              checked (
                                                  nowQuestsAverageCap * Random.Range(1f, 2.5f)
                                                  )));

            newbie = new HunterIdea(spriteNum, charaName, hunterCap);
            break;
        }
        return(newbie);


        /*
         *
         * CharactorIdea tempforDebugNewbie;
         #if UNITY_EDITOR
         * //모킹
         * if(ds.GetInstance().clientBorn)
         * tempforDebugNewbie = new ClientIdea(0, tempName, E_Personality.CHEAP);
         * //새로운 캐릭터 생성.
         * else
         *  tempforDebugNewbie = new HunterIdea(1, tempName, E_Personality.CHEAP, hunterCap);
         #endif
         * return tempforDebugNewbie;
         */
    }