veloren/common/src/comp/body.rs

22 lines
539 B
Rust
Raw Normal View History

2019-06-28 23:42:51 +00:00
pub mod humanoid;
pub mod quadruped;
pub mod quadruped_medium;
use specs::{Component, FlaggedStorage, VecStorage};
#[derive(Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Actor {
Character { name: String, body: Body },
}
impl Component for Actor {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
}
#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, Serialize, Deserialize)]
pub enum Body {
Humanoid(humanoid::Body),
Quadruped(quadruped::Body),
QuadrupedMedium(quadruped_medium::Body),
}