public ClientMsgInputs(byte[] buffer, int offset) { MsgSerializer.ValidateHeader(buffer, MsgId, ref offset); Frame = MsgSerializer.ReadUInt32(buffer, ref offset); InputMask = MsgSerializer.ReadUInt64(buffer, ref offset); }
public ServerMsgFinish(byte[] buffer, int offset) { MsgSerializer.ValidateHeader(buffer, MsgId, ref offset); Frames = MsgSerializer.ReadUInt32Array(buffer, ref offset); Hashes = MsgSerializer.ReadInt32Array(buffer, ref offset); }
public ClientMsgFinished(byte[] buffer, int offset) { MsgSerializer.ValidateHeader(buffer, MsgId, ref offset); Frame = MsgSerializer.ReadUInt32(buffer, ref offset); StateHash = MsgSerializer.ReadInt32(buffer, ref offset); }
public ClientMsgJoin(byte[] buffer, int offset) { MsgSerializer.ValidateHeader(buffer, MsgId, ref offset); Game = MsgSerializer.ReadString(buffer, ref offset); Version = MsgSerializer.ReadUInt16(buffer, ref offset); PlayerName = MsgSerializer.ReadString(buffer, ref offset); }
public ServerMsgInput(byte[] buffer, int offset) { MsgSerializer.ValidateHeader(buffer, MsgId, ref offset); Frame = MsgSerializer.ReadUInt32(buffer, ref offset); InputMask = MsgSerializer.ReadUInt64(buffer, ref offset); PlayerIndex = MsgSerializer.ReadByte(buffer, ref offset); }
public ServerMsgStart(byte[] buffer, int offset) { MsgSerializer.ValidateHeader(buffer, MsgId, ref offset); Seed = MsgSerializer.ReadInt32(buffer, ref offset); Players = MsgSerializer.ReadStringArray(buffer, ref offset); YourIndex = MsgSerializer.ReadByte(buffer, ref offset); TicksPerSecond = MsgSerializer.ReadByte(buffer, ref offset); }
public void ShouldSerializeKeepAlive() { var msg = new ClientMsgKeepAlive(); var buf = CreateBuffer(msg); var written = msg.WriteTo(buf, 0); Assert.True(written == buf.Length); var idx = 0; MsgSerializer.ValidateHeader(buf, (byte)ClientMsgId.KeepAlive, ref idx); }
public void ShouldSerializeJoined() { var msg = new ServerMsgJoined(); var buf = CreateBuffer(msg); var written = msg.WriteTo(buf, 0); Assert.True(written == buf.Length); var idx = 0; MsgSerializer.ValidateHeader(buf, (byte)ServerMsgId.Joined, ref idx); }
public ServerMsgError(byte[] buffer, int offset) { MsgSerializer.ValidateHeader(buffer, MsgId, ref offset); ErrorId = (ServerErrorId)MsgSerializer.ReadByte(buffer, ref offset); }