private void SendMouseMoveAction(MouseMoveAction action, NetworkStream stream) { // x | y WriteInt(action.Location.X, stream); WriteInt(action.Location.Y, stream); }
private MouseMoveAction GetMouseMoveAction(int senderId, NetworkStream stream) { var action = new MouseMoveAction(); action.User = _manager.ClientList[senderId]; // Get X int x = ReadInt(stream); // Get Y int y = ReadInt(stream); // Set location action.Location = new Point(x, y); return action; }