mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
23 lines
434 B
Rust
23 lines
434 B
Rust
use specs::{Component, FlaggedStorage};
|
|
use specs_idvs::IDVStorage;
|
|
use vek::*;
|
|
|
|
#[derive(Copy, Clone, Debug, PartialEq, Serialize, Deserialize)]
|
|
pub struct Waypoint {
|
|
pos: Vec3<f32>,
|
|
}
|
|
|
|
impl Waypoint {
|
|
pub fn new(pos: Vec3<f32>) -> Self {
|
|
Self { pos }
|
|
}
|
|
|
|
pub fn get_pos(&self) -> Vec3<f32> {
|
|
self.pos
|
|
}
|
|
}
|
|
|
|
impl Component for Waypoint {
|
|
type Storage = FlaggedStorage<Self, IDVStorage<Self>>;
|
|
}
|