2019-04-10 17:23:27 +00:00
|
|
|
use crate::comp;
|
2019-03-05 18:39:18 +00:00
|
|
|
|
2019-03-04 19:50:26 +00:00
|
|
|
#[derive(Clone, Debug, Serialize, Deserialize)]
|
2019-03-03 22:02:38 +00:00
|
|
|
pub enum ClientMsg {
|
2019-04-10 17:23:27 +00:00
|
|
|
Connect {
|
|
|
|
player: comp::Player,
|
|
|
|
character: Option<comp::Character>,
|
|
|
|
},
|
2019-03-05 18:39:18 +00:00
|
|
|
Ping,
|
|
|
|
Pong,
|
2019-03-03 22:02:38 +00:00
|
|
|
Chat(String),
|
2019-03-05 18:39:18 +00:00
|
|
|
PlayerPhysics {
|
2019-04-10 17:23:27 +00:00
|
|
|
pos: comp::phys::Pos,
|
|
|
|
vel: comp::phys::Vel,
|
|
|
|
dir: comp::phys::Dir,
|
2019-03-05 18:39:18 +00:00
|
|
|
},
|
2019-03-03 22:02:38 +00:00
|
|
|
Disconnect,
|
|
|
|
}
|