private void OnDeleteRole(byte[] buffer) { Account_DeleteRoleReqProto proto = Account_DeleteRoleReqProto.GetProto(buffer); int roleID = proto.RoleId; Debug.Log("server: roleID---" + roleID); DeleteRoleServerResp(roleID); }
/// <summary> /// 删除角色第五步,点击OK按钮,到主控制器走网络交互真正执行删除功能 /// </summary> private void DeleteRole() { if (OnDeleteClick != null) { OnDeleteClick(); } Account_DeleteRoleReqProto proto = new Account_DeleteRoleReqProto(); //proto.RoleId= }
/// <summary> /// 删除角色第六步,从这里真正开始删除角色的操作 /// </summary> private void OnDeleteRoleClickCallback() { //Debug.Log("6"); Debug.Log("开始删除角色!"); //TODO: 删除角色的具体实现逻辑 Account_DeleteRoleReqProto proto = new Account_DeleteRoleReqProto(); proto.RoleId = mCurrentSelectedRoleId; SocketManager.Instance.SendMessageToLocalServer(proto.ToArray()); }
public static Account_DeleteRoleReqProto GetProto(byte[] buffer) { Account_DeleteRoleReqProto proto = new Account_DeleteRoleReqProto(); using (MemoryStreamUtil ms = new MemoryStreamUtil(buffer)) { proto.RoleId = ms.ReadInt(); } return(proto); }