Ejemplo n.º 1
0
 private void PutToGraveyard(UI.CardControl cardControl)
 {
     cardControl.IsCardDead = true;
     var locationAnim = cardControl.GetAddin<UI.CardControlAddins.LocationAnimation>();
     locationAnim.SetNextLocation(
         m_playerZones[cardControl.CardData.OwnerPlayerIndex].Graveyard,
         m_graveyardCounters[cardControl.CardData.OwnerPlayerIndex].nextCounter++);
     locationAnim.Update(0); // make sure InTransition returns true
     m_cardEnteringGraveyard.Add(cardControl);
 }
Ejemplo n.º 2
0
        private void PutToLibrary(UI.CardControl cardControl)
        {
            cardControl.Style.Apply(); // to solve the default TransformToGlobal matrix
            var transform = cardControl.BodyContainer.TransformToGlobal.Invert();

            cardControl.GetAddin<UI.CardControlAddins.Flip>().InitializeToFlipped();
            cardControl.Style.Apply(); // to apply initial flipped matrix

            cardControl.Dispatcher = m_playerZones[cardControl.CardData.OwnerPlayerIndex].Library.Container;
            var pileTop = m_playerLibraryPiles[cardControl.CardData.OwnerPlayerIndex].BodyContainer;
            cardControl.Transform = transform * UI.TransformNode.GetTransformBetween(pileTop, cardControl.Dispatcher);
        }