diff --git a/game/building_factory.c b/game/building_factory.c index 3085867..3ccd9b7 100644 --- a/game/building_factory.c +++ b/game/building_factory.c @@ -91,9 +91,9 @@ ecs_entity_t placeBuilding(Game *game, BuildingType type, bool hasCollision = true; Health health = { - .startHP = 100.0f, - .hp = 100.0f, - .lastChanged = -1.0f, + .startHP = 500.0f, + .hp = 500.0f, + .lastChanged = 1000.0f, }; switch (type) { case BUILDING_KEEP: @@ -113,7 +113,7 @@ ecs_entity_t placeBuilding(Game *game, BuildingType type, .elapsed = 0.0f, } }); - health.startHP = 1000.0f; + health.startHP = 5000.0f; health.hp = health.startHP; break; case BUILDING_WAREHOUSE: @@ -146,6 +146,8 @@ ecs_entity_t placeBuilding(Game *game, BuildingType type, .elapsed = 0.0f } }); + health.startHP = 2000.0f; + health.hp = health.startHP; break; case BUILDING_TOWER: { ecs_entity_t mage = entityCreateEmpty(); diff --git a/game/main.c b/game/main.c index 53d9867..b927cd4 100644 --- a/game/main.c +++ b/game/main.c @@ -898,7 +898,7 @@ void imguiRender(float dt, void *userData) { resources.wood = wood; resources.food = food; resources.gold = gold; - //game->playerResources[game->player] = resources; + game->playerResources[game->player] = resources; igText("Pop: %lld", resources.pop); igText("Pop Capacity: %lld", resources.popCapacity); } diff --git a/game/systems/s_event.c b/game/systems/s_event.c index 0d16b72..7e47791 100644 --- a/game/systems/s_event.c +++ b/game/systems/s_event.c @@ -67,7 +67,7 @@ void damageEvent(ecs_entity_t entity, DamageEvent event) { ecs_remove(ECS, entity, Health); ecs_remove(ECS, entity, Unit); ecs_remove(ECS, entity, Building); - } else { + } else if (health->hp <= 0){ // No animation, delete right away ecs_delete(ECS, entity); }