Beispiel #1
0
    //실제 배틀 메시지를 받아오는 메소드
    void BattleMsg(int id, int index)
    {
        if (!isUntilCnt)
        {
            return;
        }

        msg            = talkManager.GetTalkData(id, index);
        battleTxt.text = msg;
        //첫번째 스테이지의 경우 단서 획득하는 장면을 위한 코드
        if (id == 0)
        {
            if (index == 10 || index == 11 || index == 15 || index == 24 || index == 28)
            {
                //index별로 단서 획득
                Stage1Selector();
            }
        }

        if (talkManager.GetTalkData(id, index + 1) == null)
        {
            int isId = id % 1000;
            if (isId == 899)
            {
                bLose = true; time = 0.0f;
            }
            //패배코드
            if (isId == 999)
            {
                //첫 스테이지에 한에서 승리
                if (gameStage == 0)
                {
                    bWin = true;
                    time = 0.0f;
                }
                //첫번째 스테이지가 아니면 패배
                else
                {
                    bLose = true;
                }
            }
            //스테이지별 승리코드
            if (gameStage == 1)
            {
                if (isId == 300 || isId == 203 || isId == 399)
                {
                    bWin = true;
                    time = 0.0f;
                }
            }
            else if (gameStage == 2)
            {
                if (isId == 300)//데미지 들어간 코드
                {
                    exp            += 5;
                    stageRoot       = 301;
                    gameQuart       = stageRoot;
                    explanText.text = "?가 죽었다.  경험치 5를 얻었다";
                    PlayerPrefs.SetInt("LV", lv);
                    PlayerPrefs.SetInt("HP", hp);
                    PlayerPrefs.SetInt("EXP", exp);
                    PlayerPrefs.SetInt("setRoot", 6);
                    bWin = true;
                    time = 0.0f;
                }
            }
            else if (gameStage == 3)
            {
                if (isId == 3 || isId == 100)
                {
                    bWin = true;
                    time = 0.0f;
                }
            }
            else if (gameStage == 4)
            {
                if (isId == 3 || isId == 103)
                {
                    bWin = true;
                    time = 0.0f;
                }
            }
            else if (gameStage == 5)
            {
                if (isId == 3 || isId == 103)
                {
                    bWin = true;
                    time = 0.0f;
                }
            }
            else if (gameStage == 6)
            {
                if (stageRoot == 5)
                {
                    bWin = true;
                    time = 0.0f;
                }
                if (stageRoot == 990)
                {
                    bLose = true;
                    time  = 0.0f;
                }
            }
            gameCnt     = 0;
            isUntilCnt  = false;
            bAttackTime = true;
            return;
        }
        gameCnt++;
    }