This commit is contained in:
azw 2023-11-01 13:50:15 +00:00
parent 91ea484067
commit cc60d5f801

View File

@ -13,20 +13,8 @@ use r9_macro_derive::Singleton;
pub mod app; pub mod app;
pub mod cs; pub mod cs;
//pub mod mtb; //pub mod mtb;
use crate::cs::cs_auto_gen as cs_auto;
pub trait MsgHandler { use crate::cs::cs_proto as cs_proto;
/*
fn cm_join(_: &f9::MsgHdr, _: Rc::<RefCell::<cs_proto::CMJoin>>) {
}
fn cm_move(&self, _: &f9::MsgHdr, _: Rc::<RefCell::<cs_proto::CMMove>>) {
}
fn cm_emote(_: &f9::MsgHdr, _: Rc::<RefCell::<cs_proto::CMEmote>>) {
}
*/
}
#[derive(SharedFromSelf)] #[derive(SharedFromSelf)]
pub struct Player { pub struct Player {
@ -40,17 +28,12 @@ pub struct PlayerNetHandler {
self_wp: Weak::<RefCell::<Player>>, self_wp: Weak::<RefCell::<Player>>,
} }
impl MsgHandler for PlayerNetHandler { impl cs_auto::MsgHandler for PlayerNetHandler {
}
impl PlayerNetHandler { fn CMPing(&self, _: &f9::MsgHdr, _: Rc::<RefCell::<cs_proto::CMPing>>) {
panic!("not implement");
/*
pub fn cm_move(hdr: &f9::MsgHdr,
msg: Rc::<RefCell::<cs_proto::CMMove>>) {
println!("seq:{}", msg.borrow().get_seq());
} }
*/
} }
#[derive(SharedFromSelf)] #[derive(SharedFromSelf)]