예제 #1
0
        public CardInstance AddCardForeignToHand(MagicCard mc)
        {
            CardInstance ci = Deck.AddCard(mc);

            ci.Controler = this;
            ci.ResetPositionAndRotation();
            ci.yAngle = MathHelper.Pi;
            Hand.AddCard(ci, true);
            return(ci);
        }
예제 #2
0
        public void AddCardToHand()
        {
            CardInstance tmp = Magic.CurrentGameWin.Players[0].Deck.AddCard(this);

            tmp.CreateGLCard();

            tmp.Controler = Magic.CurrentGameWin.Players[0];
            tmp.ResetPositionAndRotation();
            tmp.yAngle = MathHelper.Pi;
            tmp.Controler.Hand.AddCard(tmp, true);
        }
예제 #3
0
        void onAddCardToHand(object sender, MouseButtonEventArgs e)
        {
            string cardInfos = (((sender as GraphicObject).Parent.Parent.Parent as GraphicObject).
                                FindByName("cardEntries") as CardDataGrid).SelectedItem as string;
            MagicCard mc = null;

            MagicData.TryLoadCard(cardInfos, ref mc);

            CardInstance tmp = Players[0].Deck.AddCard(mc);

            tmp.CreateGLCard();

            tmp.Controler = Players[0];
            tmp.ResetPositionAndRotation();
            tmp.yAngle = MathHelper.Pi;
            tmp.Controler.Hand.AddCard(tmp, true);
        }