kubi/kubi-shared/src/networking/messages.rs

28 lines
454 B
Rust
Raw Normal View History

use glam::{Vec3, Quat};
use serde::{Serialize, Deserialize};
2023-01-29 20:42:58 -06:00
#[derive(Serialize, Deserialize)]
2023-01-29 20:42:58 -06:00
pub enum ClientToServerMessage {
ClientHello {
username: String,
password: Option<String>,
},
PositionChanged {
position: Vec3,
direction: Quat
}
2023-01-29 20:42:58 -06:00
}
#[derive(Serialize, Deserialize)]
2023-01-29 20:42:58 -06:00
pub enum ServerToClientMessage {
ServerHello {
client_id: u16,
},
ServerFuckOff {
reason: String,
},
PlayerPositionChanged {
},
2023-01-29 20:42:58 -06:00
}