Пример #1
0
    /// 엔터 버튼을 눌렀을 때
    public void textInputEnter()
    {
        string inputWord = InputText.text; //tmp에 엔터 버튼을 눌렀을 때의 문자열 저장.

        //모음인지 아닌지, 입력단어 ,현재 문제 초성(자음) value array, 어원을 사용하는지 : 0-미사용 1-고유어 2- 한자어 3-혼종어 4-외래어)
        correctState = ansJudge.IsCorrectAnswer(false, inputWord, getQuestValue(), wordType, isChapter2Boss);


        ///정답일 경우
        if (correctState > -1)//correctState 가 맞은 문제의 인덱스를 나타낸다.
        {
            m_connectToMake[correctState].m_correctState = correctState;

            tile[correctState].SetTrigger("correct"); //애니메이션이 끝날때 make new question 실행.
            signAni.Play("O");


            countCorrect_hell++;
            countCorrect_heal++;

            m_sunbi.Attack(inputWord);

            if (questionHealOrDeal_arr[correctState] == 1) //힐일 경우
            {
                m_sunbi.Heal();
                healRenderer_arr[correctState].enabled = false;
            }
            else if (questionHealOrDeal_arr[correctState] == 0) //딜일 경우
            {
                Debug.Log("딜");
            }

            if (countCorrect_hell >= hellCountNum) //2개 맞추면 헬로 만들기
            {
                isHellQuestState  = true;
                countCorrect_hell = 0;
            }
            //정답일경우 에너미 힌트투사체 카운트 리셋
            m_enemybulletHandler.ResetSunbiHitCount();

            //가장 오래된 과제, 힌트 투사체를 위한 카운트
            for (int i = 0; i < 3; i++)
            {
                if (bossStageIdx == 8)
                {
                    break;
                }

                if (i == correctState)
                {
                    oldestQuestInd_arr[correctState] = 0;
                }
                else
                {
                    oldestQuestInd_arr[i]++;
                }
            }

            //백그라운드에 정답 문자 표시
            backgroundWordGen.MakeWordRandomPos(inputWord);
        }
        /////여기 성율이가 추가함. O X 애니메이션 띄우기 위함.
        ///오답일경우
        else
        {
            ///오답 말풍선 띄우기
            speechBubble.makeBubbleText(correctState);
            signAni.Play("X");
        }

        InputText.text = ""; //입력창 초기화
    }