コード例 #1
0
    IEnumerator WaitingCardExchange()
    {
        //교환전에 카드를 자기자리에 셋팅을 하자
        m_players[0].SetCardOriginPosition();

        while (!m_isExchange)
        {
            //m_isAllReady = true;

            //for (int i = 0; i < playerSize; ++i)
            //{
            //    if (!m_players[i].IsExchagne())
            //    {
            //        m_isAllReady = false;
            //        break;
            //    }
            //}

            yield return(null);
        }

        Debug.Log("교환 되었습니다.");

        m_rutineState = RutineState.RoundState;

        m_ExchangeUi.Hide();
        m_exchangeBtn.gameObject.SetActive(false);
        SetActivePlayBtn(false);

        //m_turnPlayer = m_cardDeck.GetmahjongCard().m_ownerPlayer;
        m_startPlayer = m_turnPlayer;

        m_turnPlayer.MyTurn();

        if (m_turnPlayer == m_players[0])
        {
            m_passBtn.View();
        }
        else
        {
            m_passBtn.Hide();
            m_drawBtn.Hide();
        }
    }
コード例 #2
0
    IEnumerator ChooseLargeTichu()
    {
        m_LargeTichuPopup.gameObject.SetActive(true);

        while (m_rutineState != RutineState.SecondDivisionState)
        {
            for (int i = 0; i < playerSize; ++i)
            {
                m_isAllReady = true;

                if (!m_players[i].IsChooseLargeTichu())
                {
                    m_isAllReady = false;
                    break;
                }
            }

            if (m_isAllReady)
            {
                m_rutineState = RutineState.SecondDivisionState;
                m_LargeTichuPopup.gameObject.SetActive(false);
            }

            yield return(null);
        }

        //2차 분배
        StartCoroutine(SecondDivision());

        m_rutineState = RutineState.ExchangeState;

        m_ExchangeUi.View();
        m_exchangeBtn.gameObject.SetActive(true);
        m_drawBtn.Hide();
        m_passBtn.Hide();
    }