public HexSelector(SectorMap.Milieu map, ResourceManager resourceManager, Location location, int jump) { this.map = map ?? throw new ArgumentNullException(nameof(map)); this.resourceManager = resourceManager ?? throw new ArgumentNullException(nameof(resourceManager)); this.location = location; if (jump < 0 || jump > 36) { throw new ArgumentOutOfRangeException(nameof(jump), jump, "must be between 0 and 36 inclusive"); } this.jump = jump; }
public void Resolve(SectorMap.Milieu sectorMap, out Sector sector, out Subsector subsector) { if (sectorMap == null) { throw new ArgumentNullException("sectorMap"); } sector = null; subsector = null; sector = sectorMap.FromLocation(SectorLocation.X, SectorLocation.Y); if (sector != null) { subsector = sector.Subsector(Index); } }
public RectSelector(SectorMap.Milieu map, ResourceManager resourceManager, RectangleF rect, bool slop = true) { if (map == null) { throw new ArgumentNullException("map"); } if (resourceManager == null) { throw new ArgumentNullException("resourceManager"); } this.map = map; this.resourceManager = resourceManager; this.rect = rect; Slop = slop; SlopFactor = 0.25f; }
public HexSelector(SectorMap.Milieu map, ResourceManager resourceManager, Location location, int jump) { if (map == null) { throw new ArgumentNullException("map"); } if (resourceManager == null) { throw new ArgumentNullException("resourceManager"); } if (jump < 0 || jump > 36) { throw new ArgumentOutOfRangeException("jump", jump, "jump must be between 0 and 36 inclusive"); } this.map = map; this.resourceManager = resourceManager; this.location = location; this.jump = jump; }
public void Resolve(SectorMap.Milieu sectorMap, ResourceManager resourceManager, out Sector sector, out World world) { if (sectorMap == null) { throw new ArgumentNullException("sectorMap"); } sector = null; world = null; sector = sectorMap.FromLocation(Sector.X, Sector.Y); if (sector == null) { return; } WorldCollection worlds = sector.GetWorlds(resourceManager, cacheResults: true); if (worlds != null) { world = worlds[Hex]; } }
public HexSelector(SectorMap.Milieu map, ResourceManager resourceManager, Location location, int jump) { if (map == null) throw new ArgumentNullException("map"); if (resourceManager == null) throw new ArgumentNullException("resourceManager"); if (jump < 0 || jump > 36) throw new ArgumentOutOfRangeException("jump", jump, "jump must be between 0 and 36 inclusive"); this.map = map; this.resourceManager = resourceManager; this.location = location; this.jump = jump; }
public RectSelector(SectorMap.Milieu map, ResourceManager resourceManager, RectangleF rect) { if (map == null) throw new ArgumentNullException("map"); if (resourceManager == null) throw new ArgumentNullException("resourceManager"); this.map = map; this.resourceManager = resourceManager; this.rect = rect; }
public RectSelector(SectorMap.Milieu map, ResourceManager resourceManager, RectangleF rect, bool slop = true) { if (map == null) throw new ArgumentNullException("map"); if (resourceManager == null) throw new ArgumentNullException("resourceManager"); this.map = map; this.resourceManager = resourceManager; this.rect = rect; Slop = slop; SlopFactor = 0.25f; }