Add entity map
This commit is contained in:
@@ -73,9 +73,6 @@ ecs_entity_t placeBuilding(BzTileMap *map, BuildingType type, BzTile tileX, BzTi
|
||||
Game *game = ecs_singleton_get_mut(ECS, Game);
|
||||
i32 sizeX, sizeY;
|
||||
getBuildingSize(type, &sizeX, &sizeY);
|
||||
ECS_COMPONENT(ECS, TilePosition);
|
||||
ECS_COMPONENT(ECS, TileSize);
|
||||
ECS_COMPONENT(ECS, Owner);
|
||||
|
||||
BzTileLayer *buildingLayer = bzTileMapGetLayer(map, LAYER_BUILDINGS);
|
||||
BzTileset *buildingTileset = bzTileLayerGetTileset(map, buildingLayer);
|
||||
@@ -95,8 +92,6 @@ ecs_entity_t placeBuilding(BzTileMap *map, BuildingType type, BzTile tileX, BzTi
|
||||
bzTileLayerSetTile(buildingLayer, layerTile, x, y, 1, 1);
|
||||
buildingTile++;
|
||||
|
||||
game->entityMap[y * buildingLayer->width + x] = e;
|
||||
|
||||
bzTileMapUpdateCollider(map, x, y);
|
||||
}
|
||||
buildingTile += buildingTileset->width - sizeX;
|
||||
|
||||
Reference in New Issue
Block a user