private static void OnCreateAvatarCb(PktCreateAvatarResult res) { if (res.info != null) { CakeClient.AddCake(new CakeAvatar(res.info.avatarID, res.info)); CakeAvatar.myID = res.info.avatarID; } AClientApp.clientComm.rcvCreateAvatarCb(res.eResult, res.info); }
private static void OnEnterGameCb(PktEnterGameResult res) { if (res.info != null) { CakeClient.AddCake(new CakeAvatar(res.info.avatarID, res.info)); CakeAvatar.myID = res.info.avatarID; } AClientApp.clientComm.rcvEnterGameCb(res.info); }
private static void rcvParamUpdate(PktParamUpdate obj) { var cake = CakeClient.GetCake(obj.cakeType, obj.id, obj.iid); if (cake == null) { cake = new CakeClient(obj.cakeType, obj.id, obj.iid); CakeClient.AddCake(cake); } cake.UpdateFromPkt(obj); clientComm.rcvParamUpdate(); }