Пример #1
0
 private void SendAddVertexAction(AddVertexAction action, NetworkStream stream)
 {
     WriteInt(action.Location.X, stream);
     WriteInt(action.Location.Y, stream);
 }
Пример #2
0
        private AddVertexAction GetAddVertexAction(int senderId, NetworkStream stream)
        {
            // Location
            var action = new AddVertexAction(_manager.ClientList[senderId].ControlBox);
            var sx = ReadInt(stream);
            var sy = ReadInt(stream);
            action.Location = new Point(sx, sy);

            return action;
        }