symmetry between reading and writing int2

This commit is contained in:
Chris Forbes
2010-11-23 13:06:37 +13:00
parent 2f74207bf6
commit 88398afba6
2 changed files with 7 additions and 6 deletions

View File

@@ -8,10 +8,8 @@
*/
#endregion
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace OpenRA.Network
{
@@ -54,5 +52,11 @@ namespace OpenRA.Network
var y = r.ReadInt32();
return new int2(x, y);
}
public static void Write(this BinaryWriter w, int2 p)
{
w.Write(p.X);
w.Write(p.Y);
}
}
}