Example #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();
        }
 public virtual void AddCards(PlayerViewModel viewModel, AddCardsCommand arg)
 {
 }
 public virtual void ExecuteAddCards(AddCardsCommand command)
 {
     command.Sender = Player;
     Player.AddCards.OnNext(command);
 }
 public virtual void AddCardsHandler(AddCardsCommand command)
 {
     this.AddCards(command.Sender as PlayerViewModel, command);
 }