Exemplo n.º 1
0
        private void OnTakeActionSkip()
        {
            var msgAction = new MsgPlayerAction
            {
                qaIndex = CurrentAllowPlayerReAction.qaIndex,
                action  = (int)ActionType.enumActionType_SKIP,
            };

            MyPlayer.SendMessage((int)MessageCode.OPAction, msgAction.ToBytes());

            //MyOwner.AppendActionLog($"[skip]({MyPlayer.Name}),({CurrentAllowPlayerReAction.qaIndex})");
        }
Exemplo n.º 2
0
        private void OnTakeActionDiscardTile(List <int> tiles2Discarded)
        {
            var qaIndex2 = 0;

            if (CurrentAllowPlayerAction != null)
            {
                qaIndex2 = CurrentAllowPlayerAction.qaIndex;
            }
            else
            {
                qaIndex2 = CurrentAllowPlayerReAction.qaIndex;
            }

            var msgAction = new MsgPlayerAction
            {
                qaIndex = qaIndex2,
                action  = (int)ActionType.enumActionType_DISCARD,
            };

            msgAction.cards.AddRange(tiles2Discarded);
            MyPlayer.SendMessage((int)MessageCode.OPAction, msgAction.ToBytes());
            //MyOwner.AppendActionLog($"[discard]({MyPlayer.Name}):{MyOwner.TileId2Name(tile2Discarded)},({CurrentAllowPlayerAction.qaIndex})");
        }