Esempio n. 1
0
    IEnumerator GetTest(CardTest type, MahjongPrefab carditem = new MahjongPrefab())
    {
        switch (type)
        {
        case CardTest.group:
            yield return(GameAct.AddGroup());

            break;

        case CardTest.handCard:
            yield return(GameAct.AddHandCard(GameAct.hostUser, carditem));

            yield return(GameAct.DisplayCard(GameAct.hostUser));

            break;

        case CardTest.outCard:
            yield return(GameAct.AddOutCard(GameAct.hostUser, carditem));

            break;

        case CardTest.spacialCard:
            yield return(GameAct.AddSpacialCard(GameAct.hostUser, carditem));

            break;

        case CardTest.getCard:
            yield return(GameAct.AddHandleCard(GameAct.hostUser, carditem));

            break;

        case CardTest.insertCard:
            int index = GameAct.hostUser.handCard.Count;
            if (index < 3)
            {
                --index;
            }
            else
            {
                index = 2;
            }
            yield return(GameAct.InsertToHandCard(GameAct.hostUser, index, GameAct.hostUser.handleCard.GetMahjongCard()));

            break;

        case CardTest.diceRoll:
            yield return(GameAct.TurnDice(Random.Range(1, 7), Random.Range(1, 7)));

            break;

        case CardTest.displayDice:
            yield return(GameAct.DisapperDice());

            break;
        }
    }