Beispiel #1
0
    void SetVertical(int x, int y, string _word)
    {
        for (int i = 0; i < _word.Length; i++)
        {
            temp_Grid[x + i, y] = _word[i];
        }

        m_WordList.UseIndex(m_WordList.FindWord(_word));
    }
Beispiel #2
0
    void SetCrossVertical()
    {
        Debug.Log(m_TempWord.Answer + " Vertical Crossed 단어를 생성합니다.");
        for (int i = 0; i < m_WordList.GetAnswer(m_WordList.FindWord(m_TempWord.Answer)).Length; i++)
        {
            SetGrid((int)m_TempWordLoc.x + i, (int)m_TempWordLoc.y, m_WordList.GetAnswer(m_WordList.FindWord(m_TempWord.Answer)), i);
        }

        m_WordList.UseIndex(m_WordList.FindWord(m_TempWord.Answer));
        m_TempWord = null;
        print();
    }
    bool SetCrossVertical()
    {
        if (CheckVertical((int)m_TempWordLoc.x, (int)m_TempWordLoc.y, m_WordList.FindWord(m_TempWord.Answer)))
        {
            Debug.Log(m_TempWord.Answer + " Vertical Crossed 단어를 생성합니다.");
            for (int i = 0; i < m_WordList.GetAnswer(m_WordList.FindWord(m_TempWord.Answer)).Length; i++)
            {
                SetGrid((int)m_TempWordLoc.x + i, (int)m_TempWordLoc.y, m_WordList.GetAnswer(m_WordList.FindWord(m_TempWord.Answer))[i]);
            }

            m_WordList.UseIndex(m_WordList.FindWord(m_TempWord.Answer));
            m_TempWord = null;
            print();
            return(true);
        }

        else
        {
            return(false);
        }
    }