Beispiel #1
0
        public void OnActionResult(MsgActionResultNotify msg)
        {
            // 出牌
            if (msg.Action == (int)ActionType.EnumActionTypeDiscard)
            {
                var discardedHands = msg.ActionHands;
                foreach (var h in discardedHands)
                {
                    foreach (var d in h.Cards)
                    {
                        TilesHandList.Remove(d);
                    }

                    MeldList.Add(h);
                }

                Hand2Buttons();
                MeldList2Buttons();

                //MyOwner.BtnDiscard.Content = new Image() { Source = ImagesSrc[msg.actionTile] };
                //MyOwner.TbDiscard.Text = $"{MyPlayer.Name}->{MyOwner.TileId2Name(msg.actionTile)}";
                //MyOwner.AppendActionLog($"[discard]({MyPlayer.Name}):{MyOwner.TileId2Name(msg.actionTile)}");
                return;
            }
        }
Beispiel #2
0
 private static void OnServerMessageActionResultNotify(Player player, MsgActionResultNotify msg)
 {
     //throw new NotImplementedException();
     if (msg.TargetChairID == player.ChairId)
     {
         // my result
         player.MyWnd.OnActionResult(msg);
     }
     else
     {
         //if (msg.action != (int)ActionType.enumActionType_FirstReadyHand)
         //    player.MyWnd.CancelAllowedAction();
     }
 }