mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
c75625f179
Former-commit-id: 10a8828b1ac496c7419672b88049fbda848d9d9d
43 lines
702 B
Rust
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>;
|
|
}
|