Properly handle map collisions when placing/destroying buildings

This commit is contained in:
2024-01-08 15:27:58 +01:00
parent c08fca9670
commit 88cbfe4a37
8 changed files with 56 additions and 7 deletions

View File

@@ -10,7 +10,7 @@
typedef struct Game Game;
bool canPlaceBuilding(Game *game, BuildingType type, i32 tileX, i32 tileY);
ecs_entity_t placeBuilding(Game *game, BuildingType type, i32 tileX, i32 tileY, Owner owner);
ecs_entity_t placeBuilding(Game *game, BuildingType type, i32 posX, i32 posY, Owner owner);
Vector2 getPositionNearBuilding(ecs_entity_t building, Vector2 fromPos);