wicked-waifus-rs/wicked-waifus-game-server/src/logic/components/position.rs

11 lines
381 B
Rust

use crate::logic::{ecs::component::Component, math::Transform};
pub struct Position(pub Transform);
impl Component for Position {
fn set_pb_data(&self, pb: &mut wicked_waifus_protocol::EntityPb) {
pb.pos = Some(self.0.get_position_protobuf());
pb.rot = Some(self.0.get_rotation_protobuf());
pb.init_pos = Some(self.0.get_position_protobuf());
}
}