示例#1
0
        public override void AddCards(PlayerViewModel viewModel, AddCardsCommand arg)
        {
            base.AddCards(viewModel, arg);

            foreach (CardInfo ci in arg.CardInfos)
            {
                CardViewModel card = MVVMKernelExtensions.CreateViewModel <CardViewModel> ();
                card.Info = ci;

                if (viewModel.IsSelf)
                {
                    card.Face = CardFace.FaceUp;
                }
                else
                {
                    card.Face = CardFace.FaceDown;
                }

                card.Place        = CardPlace.Floor;
                card.OwnerActorId = viewModel.ActorId;
                viewModel.HandCards.Add(card);
            }

            viewModel.ExecuteReorder();
        }
示例#2
0
 public virtual void AddCards(PlayerViewModel viewModel, AddCardsCommand arg)
 {
 }
 public virtual void ExecuteAddCards(AddCardsCommand command)
 {
     command.Sender = Player;
     Player.AddCards.OnNext(command);
 }
示例#4
0
 public virtual void AddCardsHandler(AddCardsCommand command)
 {
     this.AddCards(command.Sender as PlayerViewModel, command);
 }