Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 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;
 }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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);
        }