예제 #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);
 }
예제 #2
0
파일: Map.cs 프로젝트: EugeneWang/ShootR
 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);
 }
예제 #3
0
파일: Map.cs 프로젝트: satishfied/ShootR
 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;
 }
예제 #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);
        }
예제 #5
0
파일: Map.cs 프로젝트: EugeneWang/ShootR
        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);
        }