public static byte[] Serialize(TerrainMessageType type, byte[] content)
        {
            List <byte> message = new List <byte>(content.Length + 1);

            message.Add((byte)type);
            message.AddRange(content);
            return(message.ToArray());
        }
Esempio n. 2
0
 private void SendOrEnqueue(int connectionID, TerrainMessageType type, byte[] content)
 {
     SendOrEnqueue(new TerrainMessageResponse(connectionID, type, content));
 }
 private void SendOrEnqueue(TerrainMessageType type, Vector3i position)
 {
     SendOrEnqueue(new TerrainMessageResponse(type, position));
 }
 public TerrainMessageResponse(int connectionID, TerrainMessageType type, byte[] content)
 {
     this.Type         = type;
     this.Content      = content;
     this.ConnectionID = connectionID;
 }
Esempio n. 5
0
 public TerrainMessageResponse(TerrainMessageType type, Vector3i position)
 {
     this.Type          = type;
     this.ChunkPosition = position;
 }