use specs::{Component, FlaggedStorage}; use specs_idvs::IDVStorage; use vek::*; #[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Waypoint { pos: Vec3, } impl Waypoint { pub fn new(pos: Vec3) -> Self { Self { pos } } pub fn get_pos(&self) -> Vec3 { self.pos } } impl Component for Waypoint { type Storage = FlaggedStorage>; } #[derive(Copy, Clone, Debug, PartialEq)] pub struct WaypointArea(f32); impl Component for WaypointArea { type Storage = FlaggedStorage>; } impl Default for WaypointArea { fn default() -> Self { Self(5.0) } }