2019-07-29 19:54:48 +00:00
|
|
|
use specs::{Component, FlaggedStorage};
|
|
|
|
use specs_idvs::IDVStorage;
|
2019-07-29 19:54:58 +00:00
|
|
|
use vek::*;
|
2019-06-09 14:20:20 +00:00
|
|
|
|
|
|
|
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
|
|
|
pub struct Controller {
|
|
|
|
pub move_dir: Vec2<f32>,
|
|
|
|
pub jump: bool,
|
|
|
|
pub attack: bool,
|
2019-08-24 16:38:59 +00:00
|
|
|
pub block: bool,
|
2019-06-11 04:08:55 +00:00
|
|
|
pub roll: bool,
|
|
|
|
pub glide: bool,
|
2019-06-09 14:20:20 +00:00
|
|
|
pub respawn: bool,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Component for Controller {
|
2019-07-29 19:54:48 +00:00
|
|
|
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
|
2019-06-09 14:20:20 +00:00
|
|
|
}
|