Exemple #1
0
        private void DropBindedEntity()
        {
            GEntity SlaveEntity = GetSlaveEntityMoving();

            if (SlaveEntity != null)
            {
                int[] Offs = GameLevel.GetNewEntityOffsets();
                SlaveEntity.X = X + Offs[0];
                SlaveEntity.Y = Y + Offs[1];

                if (GameLevel.GetNonDraggableIntersectingEntities(SlaveEntity).Count > 0)
                {
                    SlaveEntity.X -= Offs[0];
                    SlaveEntity.Y -= Offs[1];
                    AddInvItem(InvItem.FindInvItem(SlaveEntity.ToString()));
                }
                else
                {
                    SlaveEntity.UnbindMasterEntityMoving();
                    SetSlaveEntityMoving(null);
                }
            }
        }