veloren/common/src/comp/player.rs

17 lines
322 B
Rust
Raw Normal View History

use specs::{Component, FlaggedStorage, VecStorage};
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct Player {
pub alias: String,
}
impl Player {
pub fn new(alias: String) -> Self {
Self { alias }
}
}
impl Component for Player {
type Storage = FlaggedStorage<Self, VecStorage<Self>>;
}