veloren/common/src/comp/phys.rs
Joshua Barretto c75625f179 Physics update adjustment
Former-commit-id: 10a8828b1ac496c7419672b88049fbda848d9d9d
2019-03-19 11:35:38 +00:00

43 lines
702 B
Rust

// Library
use specs::{Component, VecStorage};
use vek::*;
// Pos
#[derive(Copy, Clone, Debug, Serialize, Deserialize)]
pub struct Pos(pub Vec3<f32>);
impl Component for Pos {
type Storage = VecStorage<Self>;
}
// Vel
#[derive(Copy, Clone, Debug, Serialize, Deserialize)]
pub struct Vel(pub Vec3<f32>);
impl Component for Vel {
type Storage = VecStorage<Self>;
}
// Dir
#[derive(Copy, Clone, Debug, Serialize, Deserialize)]
pub struct Dir(pub Vec3<f32>);
impl Component for Dir {
type Storage = VecStorage<Self>;
}
// UpdateKind
#[derive(Copy, Clone, Debug)]
pub enum UpdateKind {
Passive,
Force,
}
impl Component for UpdateKind {
type Storage = VecStorage<Self>;
}