MoveTo() public method

public MoveTo ( Group to, bool lFaceUp, bool isScriptMove ) : void
to Group
lFaceUp bool
isScriptMove bool
return void
コード例 #1
0
ファイル: Script_3_1_0_0.cs プロジェクト: wlk0/OCTGN
        public void CardMoveTo(int cardId, int groupId, int?position)
        {
            Card  card  = Card.Find(cardId);
            Group group = Group.Find(groupId);

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

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

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

            QueueAction(() =>
            {
                //Program.GameEngine.EventProxy.MuteEvents = true;
                if (position == null)
                {
                    card.MoveTo(group, true, true);
                }
                else
                {
                    card.MoveTo(group, true, position.Value, true);
                }
                //Program.GameEngine.EventProxy.MuteEvents = false;
            });
        }