Octgn.Play.Card.MoveToTable C# (CSharp) Méthode

MoveToTable() public méthode

public MoveToTable ( int x, int y, bool lFaceUp, int idx, bool isScriptMove ) : void
x int
y int
lFaceUp bool
idx int
isScriptMove bool
Résultat void
        public void MoveToTable(int x, int y, bool lFaceUp, int idx, bool isScriptMove)
        {
            MoveCardsToTable(new[] { this }, new[] { x }, new[] { y }, new[] { lFaceUp }, new[] { idx }, true);
        }

Usage Example

Exemple #1
0
        //Set's the card's index to idx.  Enforces a TableOnly rule, since the index's on other piles/groups are inverted.
        //ralig98
        public void CardSetIndex(int CardId, int idx, bool TableOnly = false)
        {
            if (idx < 0)
            {
                Program.GameMess.Warning("Cannot setIndex({0}), number is less than 0", idx);
                return;
            }
            Card card = Card.Find(CardId);

            if (card.Controller != Player.LocalPlayer)
            {
                Program.GameMess.Warning(String.Format("{0} Can't set index of {1} to Table because they don't control {1}.", Player.LocalPlayer.Name, card.Name));
            }

            if (card.Group != Program.GameEngine.Table && card.Group.Controller != Player.LocalPlayer)
            {
                Program.GameMess.Warning(String.Format("{0} Can't set index of {1} in {2} because they don't control it.", Player.LocalPlayer.Name, card, card.Group));
            }

            if (!TableOnly || (TableOnly && card.Group is Table))
            {
                QueueAction(
                    () =>
                {
                    //Program.GameEngine.EventProxy.MuteEvents = true;
                    card.MoveToTable((int)card.X, (int)card.Y, card.FaceUp, idx, true);
                    //Program.GameEngine.EventProxy.MuteEvents = false;
                });
            }
        }
All Usage Examples Of Octgn.Play.Card::MoveToTable