show range indicator when placing tower, cleanup tower info stats
This commit is contained in:
parent
e6b04bbdd1
commit
3a25a1bd87
9 changed files with 106 additions and 49 deletions
|
|
@ -69,8 +69,8 @@ pub struct Died {
|
|||
pub slayer: Option<Entity>,
|
||||
}
|
||||
|
||||
#[derive(Component, Clone, Debug, Reflect)]
|
||||
#[require(InvulnerabilityTime)]
|
||||
#[derive(Component, Clone, Copy, Debug, Reflect)]
|
||||
#[require(InvulnerabilityTime, Defense)]
|
||||
pub struct Health {
|
||||
pub max: f32,
|
||||
pub current: f32,
|
||||
|
|
@ -127,8 +127,7 @@ impl From<&InvulnerabilityTime> for Invulnerable {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Component, Clone, Debug, Default)]
|
||||
#[require(Health)]
|
||||
#[derive(Component, Clone, Copy, Debug, Default)]
|
||||
pub struct Defense {
|
||||
pub amount: f32,
|
||||
}
|
||||
|
|
@ -254,7 +253,7 @@ fn tick_invulnerability(
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Component, Deref, DerefMut)]
|
||||
#[derive(Component, Deref, DerefMut, Clone, Copy)]
|
||||
pub struct Range(pub f32);
|
||||
|
||||
impl Range {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue