public Map() { // Double collidable for fast removes/inserts _allObjects = new List <Collidable>(); _space = new QuadTree(WIDTH, HEIGHT, MIN_PARTITION_WIDTH, MIN_PARTITION_HEIGHT); _boundary = new MapBoundary(WIDTH, HEIGHT); }
public Map() { // Double collidable for fast removes/inserts _allObjects = new List<Collidable>(); _space = new QuadTree(WIDTH, HEIGHT, MIN_PARTITION_WIDTH, MIN_PARTITION_HEIGHT); _boundary = new MapBoundary(WIDTH, HEIGHT); }
public Map(Game game, IHubContext <GameHub> gameHub) { // Double collidable for fast removes/inserts _allObjects = new List <Collidable>(); _space = new QuadTree(WIDTH, HEIGHT, MIN_PARTITION_WIDTH, MIN_PARTITION_HEIGHT); _boundary = new MapBoundary(WIDTH, HEIGHT); _game = game; _gameHub = gameHub; }
public void IncreaseSize() { WIDTH *= 2; HEIGHT *= 2; MAX_SHIPS *= 4; MIN_PARTITION_WIDTH *= 2; MIN_PARTITION_HEIGHT *= 2; _boundary = new MapBoundary(WIDTH, HEIGHT); _space.ExpandTo(WIDTH, HEIGHT, MIN_PARTITION_WIDTH, MIN_PARTITION_HEIGHT); }