Beispiel #1
0
    private void guiFinalMauBinh()
    {
        if (!players[0].cardMauBinh[0].getCardbyPos(2).gameObject.activeInHierarchy ||
            players[0].cardMauBinh[0].getCardbyPos(2).getId() > 51)
        {
            return;
        }
        int[] cardFinal = new int[13];
        int[] chi1      = new int[5];
        int[] chi2      = new int[5];
        int[] chi3      = new int[3];

        chi1 = PokerCard.sortValue(players[0].cardMauBinh[2]
                                   .getArrayCardAllTrue());
        chi2 = PokerCard.sortValue(players[0].cardMauBinh[1]
                                   .getArrayCardAllTrue());
        chi3 = PokerCard.sortValue(players[0].cardMauBinh[0]
                                   .getArrayCardAllTrue());

        for (int i = 0; i < chi1.Length; i++)
        {
            cardFinal[i] = chi1[i];
        }

        for (int i = 5; i < chi2.Length + 5; i++)
        {
            cardFinal[i] = chi2[i - 5];
        }

        for (int i = 10; i < chi3.Length + 10; i++)
        {
            cardFinal[i] = chi3[i - 10];
        }

        isSendCard = true;
        SendData.onFinalMauBinh(cardFinal);
        btn_xong.gameObject.SetActive(false);
        btn_xeplai.gameObject.SetActive(true);
        setTypeCard(0, 0, true, true);
        setTypeCard(0, 1, true, true);
        setTypeCard(0, 2, true, true);

        players[0].cardMauBinh[0].resetPostionCard(120);
        players[0].cardMauBinh[1].resetPostionCard(200);
        players[0].cardMauBinh[2].resetPostionCard(200);

        setPositionCardHand(players[0].cardMauBinh[0].gameObject, true, 60);
        setPositionCardHand(players[0].cardMauBinh[1].gameObject, true, 30);
    }
Beispiel #2
0
    private void guiFinalMauBinh()
    {
        if (!players[0].cardMauBinh[0].getCardbyPos(2).gameObject.activeInHierarchy ||
            players[0].cardMauBinh[0].getCardbyPos(2).getId() > 51)
        {
            return;
        }
        int[] cardFinal = new int[13];
        int[] chi1      = new int[5];
        int[] chi2      = new int[5];
        int[] chi3      = new int[3];

        chi1 = PokerCard.sortValue(players[0].cardMauBinh[2]
                                   .getArrayCardAllTrue());
        chi2 = PokerCard.sortValue(players[0].cardMauBinh[1]
                                   .getArrayCardAllTrue());
        chi3 = PokerCard.sortValue(players[0].cardMauBinh[0]
                                   .getArrayCardAllTrue());

        for (int i = 0; i < chi1.Length; i++)
        {
            cardFinal[i] = chi1[i];
        }

        for (int i = 5; i < chi2.Length + 5; i++)
        {
            cardFinal[i] = chi2[i - 5];
        }

        for (int i = 10; i < chi3.Length + 10; i++)
        {
            cardFinal[i] = chi3[i - 10];
        }

        isSendCard = true;
        SendData.onFinalMauBinh(cardFinal);
        btn_xong.gameObject.SetActive(false);
        btn_xeplai.gameObject.SetActive(true);
        action_card_down();

        gameControl.isTouchMB = false;
        setTouchCardMB(false);
        card_show_mb.gameObject.SetActive(false);
    }