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); }
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); }
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); }