Add Pool for tracking current and max stat values.

This commit is contained in:
Nolan Darilek 2021-06-01 19:38:33 -05:00
parent 6eabdf52ab
commit 20692919dc

View File

@ -434,6 +434,12 @@ impl From<&dyn PointLike> for (i32, i32) {
#[reflect(Component)] #[reflect(Component)]
pub struct Player; pub struct Player;
#[derive(Clone, Copy, Debug)]
pub struct Pool<T> {
pub value: T,
pub max: T,
}
fn copy_coordinates_to_transform( fn copy_coordinates_to_transform(
config: Res<CoreConfig>, config: Res<CoreConfig>,
mut query: Query<(&Coordinates, &mut Transform)>, mut query: Query<(&Coordinates, &mut Transform)>,