mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Added figure colour to shader and health component
Former-commit-id: e2c23e5132991cc436a678af43782e31ffc55516
This commit is contained in:
parent
ef8daef828
commit
6f984ca181
@ -396,6 +396,16 @@ impl FigureMgr {
|
|||||||
.map(|(change_by, change_time)| Rgba::new(1.0, 0.7, 0.7, 1.0))
|
.map(|(change_by, change_time)| Rgba::new(1.0, 0.7, 0.7, 1.0))
|
||||||
.unwrap_or(Rgba::broadcast(1.0));
|
.unwrap_or(Rgba::broadcast(1.0));
|
||||||
|
|
||||||
|
// Change in health as color!
|
||||||
|
let col = stats
|
||||||
|
.and_then(|stats| stats.hp.last_change)
|
||||||
|
.map(|(change_by, change_time)| {
|
||||||
|
Rgba::new(1.0, 0.7, 0.7, 1.0)
|
||||||
|
})
|
||||||
|
.unwrap_or(Rgba::broadcast(1.0));
|
||||||
|
|
||||||
|
state.update(renderer, pos.0, dir.0, col);
|
||||||
|
|
||||||
state.update(renderer, pos.0, dir.0, col);
|
state.update(renderer, pos.0, dir.0, col);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user