Ejemplo n.º 1
0
 // ダブルチャレンジの選択
 public void SelectJudgColor(bool color)
 {
     if (color)
     {
         m_JudgColor = JUDG_COLOR.RED;
     }
     else
     {
         m_JudgColor = JUDG_COLOR.BLUE;
     }
     SetAnnouncePanel(false);
     PullAction();
 }
Ejemplo n.º 2
0
    // ゲームループ
    private IEnumerator GameLoop()
    {
        // プレイヤーの動作待ち(引くorパス)
        NextPlayerInfo();
        NextTrunPlayer();
        if (IsDoubleJudg())
        {
            yield return(new WaitForSeconds(OTHERS_WAITTIME));

            SetAnnouncePanel(true, true);
            // プレイヤーの操作入力待ち
            while (!IsJudgColor())
            {
                yield return(null);
            }
        }
        SetPullButton(true);
        // プレイヤーの操作入力待ち
        while (!m_IsPlaying)
        {
            PassAction();
            yield return(null);
        }
        SetPullButton(false); // 念のため
        m_IsPlaying = false;
        yield return(new WaitForSeconds(CARD_MOVE_WAITTIME));

        // Doubleカード出現時
        if (IsDoubleChallenge())
        {
            if (m_DeckNum > 2)
            {
                yield return(new WaitForSeconds(CARD_MOVE_WAITTIME));  // ダブルカードが重なった時に表示が早い

                SetAnnouncePanel(true);
                m_DoubleMode = DOUBLE_MODE.JUGDMENT;
                yield return(new WaitForSeconds(DOUBLE_CHALLENGE_MESSAGE_WAITTIME));
            }
        }
        else if (IsDoubleJudg())
        {
            SearchFieldCard();
            yield return(new WaitForSeconds(PICK_FAILURE_WAITTIME));

            yield return(new WaitForSeconds(PICK_FAILURE_WAITTIME));

            yield return(PenaltyScore());

            yield return(ResetField());

            m_DoubleMode = DOUBLE_MODE.NONE;
            m_JudgColor  = JUDG_COLOR.NONE;
        }
        else
        {
            if (m_ActionMode == ACTION_MODE.PULL)
            {
                // 成功or失敗の確認
                SearchFieldCard();
                if (!IsSuccess())
                {
                    yield return(new WaitForSeconds(PICK_FAILURE_WAITTIME));

                    yield return(PenaltyScore());

                    yield return(ResetField());
                }
                else
                {
                    yield return(new WaitForSeconds(PICK_FAILURE_WAITTIME));
                }
            }
            else if (m_ActionMode == ACTION_MODE.PASS)
            {
                SearchFieldCard();
                yield return(PassPenalty());
            }
        }

        // ゲーム終了の確認
        yield return(new WaitForSeconds(NEXT_TURM_WAITTIME));

        m_ActionMode = ACTION_MODE.NONE;
        SetAnnouncePanel(false);
        if (!IsFinish())
        {
            m_Turn++;
            StartCoroutine(GameLoop());
        }
        else
        {
            WhoWins();
        }
    }