Add 8 layers to collisions
This commit is contained in:
@@ -95,7 +95,7 @@ void unloadMap(Game *game) {
|
||||
void loadMap(Game *game, const char *path) {
|
||||
game->map = bzTileMapCreate(&(BzTileMapDesc) {
|
||||
.path=path,
|
||||
.generateCollisionMap=true,
|
||||
.collisionMap=true,
|
||||
.tilesets[0]=game->tileset,
|
||||
|
||||
.layers[LAYER_TERRAIN]=(BzTileLayerDesc) {"terrain", .renderer=terrainRender, .applyColliders=true},
|
||||
@@ -123,6 +123,8 @@ void loadMap(Game *game, const char *path) {
|
||||
game->camera.rotation = 0.0f;
|
||||
game->camera.zoom = 3.0f;
|
||||
|
||||
bzTileMapAddLayerCollisions(&game->map, LAYER_TERRAIN, COLL_LAYER_TERRAIN);
|
||||
|
||||
bzTileMapOverrideLayer(&game->map, LAYER_TREES, initTreesLayer);
|
||||
bzTileMapOverrideLayer(&game->map, LAYER_TREES2, initTreesLayer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user