buildling health bars
This commit is contained in:
parent
6c0ac7f66d
commit
56a4f8b597
10 changed files with 581 additions and 10 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue