void handle_other_exit_match_res(cmd_msg msg) { UserExitMatch res = proto_man.protobuf_deserialize <UserExitMatch>(msg.body); if (res == null) { return; } int seatid = res.seatid; for (int i = 0; i < ugames.Instance.other_users.Count; i++) { if (ugames.Instance.other_users[i].seatid == seatid) { event_manager.Instance.dispatch_event(event_manager.EVT_OTHER_EXIT_MATCH_SUCCESS, i); ugames.Instance.other_users.RemoveAt(i); return; } } }
private void OnOtherUserExitReturn(cmd_msg msg) { UserExitMatch res = proto_man .protobuf_deserialize <UserExitMatch>(msg.body); if (res == null) { return; } for (int i = 0; i < UGame.Instance.otherUsers.Count; i++) { if (UGame.Instance.otherUsers[i].seatid == res.seatid) { EventManager.Instance.DispatchEvent ("other_user_exit", i); UGame.Instance.otherUsers.RemoveAt(i); return; } } }
private void on_other_user_exit_match(cmd_msg msg) { UserExitMatch res = proto_man.protobuf_deserialize <UserExitMatch>(msg.body); if (null == res) { return; } var list = ugame.Instance.other_users; var seatid = res.seatid; for (int i = 0; i < list.Count; i++) { if (list[i].seatid == seatid) { list.RemoveAt(i); break; } } event_manager.Instance.dispatch_event("other_user_exit", seatid); }