buildling health bars

This commit is contained in:
Jim 2025-09-01 13:35:18 -04:00
parent 6c0ac7f66d
commit 56a4f8b597
Signed by: jim
GPG key ID: 3D7D94BA53088BF4
10 changed files with 581 additions and 10 deletions

View file

@ -12,6 +12,7 @@ use combat::{Health, Team};
use input::Selectable;
use resources::{Cost, Resources};
use state::GameSystemSet;
use ui_health_bar::BarSettings;
use upgrade::{Upgradable, UpgradeTree};
pub struct BuildingPlugin;
@ -234,6 +235,11 @@ fn place_building(
RigidBody::Static,
Team::Core.collision_layers(),
Upgradable::new(*info_entity),
BarSettings {
offset: size_v3.y / 2. + 0.5,
width: (size_v3.x.max(size_v3.z) * 8.).ceil() as u32,
..default()
},
))
.id();
building_map.place_building(*location, info, *info_entity, instance);