示例#1
0
        public void Place(ISpaceObject sobj, Point coords)
        {
            var sys = sobj.FindStarSystem();

            if (sys != null)
            {
                sys.Remove(sobj);
                sobj.Sector = null;
            }
            else
            {
                sobj.Sector = new Sector(this, coords);
            }

            SpaceObjectLocations.Add(new ObjectLocation <ISpaceObject>(sobj, coords));

            MarkAsExploredBy(sobj.Owner);

            // see if we got hit by a minefield
            if (!Serializer.IsDeserializing)
            {
                sobj.DealWithMines();
            }
        }