Procházet zdrojové kódy

UDP协议,客户端服务端RPC调用,调试通过!

tanghai před 9 roky
rodič
revize
d78963b2f6

+ 6 - 15
Unity/Assets/Plugins/Base/Message/AMEvent.cs

@@ -1,22 +1,13 @@
-using System;
-using Base;
-
-namespace Base
+namespace Base
 {
 {
-	public interface IMessageHandler
-	{
-		void Register<T>(ushort opcode, Action<Entity, T> action);
-		void RegisterOpcode(Type type, ushort opcode);
-	}
-
-	public abstract class AMEvent<T>: IMRegister<IMessageHandler>
+	public abstract class AMEvent<T>: IMRegister
 	{
 	{
-		public abstract void Run(Entity scene, T message);
+		public abstract void Run(Entity scene, T message, uint rpcId);
 
 
-		public void Register(IMessageHandler component, ushort opcode)
+		public void Register(IMessageHandler component)
 		{
 		{
-			component.RegisterOpcode(typeof(T), opcode);
-			component.Register<T>(opcode, Run);
+			ushort opcode = component.GetOpcode(typeof (T));
+			component.RegisterHandler<T>(opcode, Run);
 		}
 		}
 	}
 	}
 }
 }

+ 11 - 3
Unity/Assets/Plugins/Base/Message/IMRegister.cs

@@ -1,7 +1,15 @@
-namespace Base
+using System;
+
+namespace Base
 {
 {
-	public interface IMRegister<in T>
+	public interface IMessageHandler
 	{
 	{
-		void Register(T component, ushort opcode);
+		void RegisterHandler<T>(ushort opcode, Action<Entity, T, uint> action);
+		ushort GetOpcode(Type type);
+	}
+
+	public interface IMRegister
+	{
+		void Register(IMessageHandler messageHandler);
 	}
 	}
 }
 }

+ 1 - 4
Unity/Assets/Plugins/Base/Message/MessageAttribute.cs

@@ -7,14 +7,11 @@ namespace Base
 	/// </summary>
 	/// </summary>
 	public class MessageAttribute : Attribute
 	public class MessageAttribute : Attribute
 	{
 	{
-		public ushort Opcode { get; private set; }
-		
 		public string AppType { get; private set; }
 		public string AppType { get; private set; }
 
 
-		public MessageAttribute(string appType, ushort opcode)
+		public MessageAttribute(string appType)
 		{
 		{
 			this.AppType = appType;
 			this.AppType = appType;
-			this.Opcode = opcode;
 		}
 		}
 	}
 	}
 }
 }

+ 14 - 0
Unity/Assets/Plugins/Base/Message/OpcodeAttribute.cs

@@ -0,0 +1,14 @@
+using System;
+
+namespace Base
+{
+	public class OpcodeAttribute : Attribute
+	{
+		public ushort Opcode { get; private set; }
+
+		public OpcodeAttribute(ushort opcode)
+		{
+			this.Opcode = opcode;
+		}
+	}
+}

+ 2 - 2
Unity/Assets/Scripts/Message/Opcode.cs.meta → Unity/Assets/Plugins/Base/Message/OpcodeAttribute.cs.meta

@@ -1,6 +1,6 @@
 fileFormatVersion: 2
 fileFormatVersion: 2
-guid: 3b1f08e7db313b14e8cbef1715afae2d
-timeCreated: 1474947336
+guid: 485eb61dbc2b9664d80d40e19aa80c49
+timeCreated: 1476612496
 licenseType: Pro
 licenseType: Pro
 MonoImporter:
 MonoImporter:
   serializedVersion: 2
   serializedVersion: 2

+ 7 - 7
Unity/Assets/Plugins/Base/Network/UNet/NativeMethods.cs

@@ -81,25 +81,25 @@ namespace Base
 		[DllImport(LIB, EntryPoint = "enet_peer_throttle_configure", CallingConvention = CallingConvention.Cdecl)]
 		[DllImport(LIB, EntryPoint = "enet_peer_throttle_configure", CallingConvention = CallingConvention.Cdecl)]
 		internal static extern void ENetPeerThrottleConfigure(IntPtr peer, uint interval, uint acceleration, uint deceleration);
 		internal static extern void ENetPeerThrottleConfigure(IntPtr peer, uint interval, uint acceleration, uint deceleration);
 
 
-		[DllImport(LIB, EntryPoint = "enet_peer_send")]
+		[DllImport(LIB, EntryPoint = "enet_peer_send", CallingConvention = CallingConvention.Cdecl)]
 		internal static extern int ENetPeerSend(IntPtr peer, byte channelID, IntPtr packet);
 		internal static extern int ENetPeerSend(IntPtr peer, byte channelID, IntPtr packet);
 
 
-		[DllImport(LIB, EntryPoint = "enet_peer_receive")]
+		[DllImport(LIB, EntryPoint = "enet_peer_receive", CallingConvention = CallingConvention.Cdecl)]
 		internal static extern IntPtr ENetPeerReceive(IntPtr peer, out byte channelID);
 		internal static extern IntPtr ENetPeerReceive(IntPtr peer, out byte channelID);
 
 
-		[DllImport(LIB, EntryPoint = "enet_peer_reset")]
+		[DllImport(LIB, EntryPoint = "enet_peer_reset", CallingConvention = CallingConvention.Cdecl)]
 		internal static extern void ENetPeerReset(IntPtr peer);
 		internal static extern void ENetPeerReset(IntPtr peer);
 
 
-		[DllImport(LIB, EntryPoint = "enet_peer_ping")]
+		[DllImport(LIB, EntryPoint = "enet_peer_ping", CallingConvention = CallingConvention.Cdecl)]
 		internal static extern void ENetPeerPing(IntPtr peer);
 		internal static extern void ENetPeerPing(IntPtr peer);
 
 
-		[DllImport(LIB, EntryPoint = "enet_peer_disconnect_now")]
+		[DllImport(LIB, EntryPoint = "enet_peer_disconnect_now", CallingConvention = CallingConvention.Cdecl)]
 		internal static extern void ENetPeerDisconnectNow(IntPtr peer, uint data);
 		internal static extern void ENetPeerDisconnectNow(IntPtr peer, uint data);
 
 
-		[DllImport(LIB, EntryPoint = "enet_peer_disconnect")]
+		[DllImport(LIB, EntryPoint = "enet_peer_disconnect", CallingConvention = CallingConvention.Cdecl)]
 		internal static extern void ENetPeerDisconnect(IntPtr peer, uint data);
 		internal static extern void ENetPeerDisconnect(IntPtr peer, uint data);
 
 
-		[DllImport(LIB, EntryPoint = "enet_peer_disconnect_later")]
+		[DllImport(LIB, EntryPoint = "enet_peer_disconnect_later", CallingConvention = CallingConvention.Cdecl)]
 		internal static extern void ENetPeerDisconnectLater(IntPtr peer, uint data);
 		internal static extern void ENetPeerDisconnectLater(IntPtr peer, uint data);
 	}
 	}
 }
 }

+ 2 - 0
Unity/Assets/Plugins/Base/Network/UNet/UPoller.cs

@@ -52,6 +52,8 @@ namespace Base
 			{
 			{
 				throw new Exception("Host creation call failed.");
 				throw new Exception("Host creation call failed.");
 			}
 			}
+
+			NativeMethods.ENetHostCompressWithRangeCoder(this.host);
 		}
 		}
 
 
 		public void Dispose()
 		public void Dispose()

+ 28 - 3
Unity/Assets/Plugins/Base/Network/UNet/USocket.cs

@@ -18,8 +18,32 @@ namespace Base
 		private readonly Queue<byte[]> recvQueue = new Queue<byte[]>();
 		private readonly Queue<byte[]> recvQueue = new Queue<byte[]>();
 		private readonly Queue<BufferInfo> sendQueue = new Queue<BufferInfo>();
 		private readonly Queue<BufferInfo> sendQueue = new Queue<BufferInfo>();
 		private bool isConnected;
 		private bool isConnected;
-		public Action Disconnect;
-		public Action Received;
+		public Action disconnect;
+		public Action received;
+
+		public event Action Received
+		{
+			add
+			{
+				this.received += value;
+			}
+			remove
+			{
+				this.received -= value;
+			}
+		}
+
+		public event Action Disconnect
+		{
+			add
+			{
+				this.disconnect += value;
+			}
+			remove
+			{
+				this.disconnect -= value;
+			}
+		}
 
 
 		public USocket(IntPtr peerPtr, UPoller poller)
 		public USocket(IntPtr peerPtr, UPoller poller)
 		{
 		{
@@ -127,11 +151,12 @@ namespace Base
 				byte[] bytes = packet.Bytes;
 				byte[] bytes = packet.Bytes;
 				this.RecvQueue.Enqueue(bytes);
 				this.RecvQueue.Enqueue(bytes);
 			}
 			}
+			this.received();
 		}
 		}
 
 
 		internal void OnDisconnect(ENetEvent eNetEvent)
 		internal void OnDisconnect(ENetEvent eNetEvent)
 		{
 		{
-			Disconnect();
+			disconnect();
 		}
 		}
 	}
 	}
 }
 }

+ 14 - 14
Unity/Assets/Scripts/Component/MessageComponent.cs

@@ -20,7 +20,7 @@ namespace Model
 	/// </summary>
 	/// </summary>
 	public class MessageComponent: Component
 	public class MessageComponent: Component
 	{
 	{
-		private uint RpcId { get; set; }
+		private static uint RpcId { get; set; }
 		private readonly Dictionary<uint, Action<byte[], int, int>> requestCallback = new Dictionary<uint, Action<byte[], int, int>>();
 		private readonly Dictionary<uint, Action<byte[], int, int>> requestCallback = new Dictionary<uint, Action<byte[], int, int>>();
 		private readonly Dictionary<ushort, Action<byte[], int, int>> waitCallback = new Dictionary<ushort, Action<byte[], int, int>>();
 		private readonly Dictionary<ushort, Action<byte[], int, int>> waitCallback = new Dictionary<ushort, Action<byte[], int, int>>();
 		private AChannel channel;
 		private AChannel channel;
@@ -82,8 +82,8 @@ namespace Model
 		{
 		{
 			int offset = 0;
 			int offset = 0;
 			uint flagUInt = BitConverter.ToUInt32(messageBytes, 2);
 			uint flagUInt = BitConverter.ToUInt32(messageBytes, 2);
-			bool isCompressed = (byte)(flagUInt >> 24) == 1;
-			if (isCompressed) // 表示有压缩,需要解压缩
+			bool isCompressed = (flagUInt & 0x80000000) > 0;
+			if (isCompressed) // 最高位为1,表示有压缩,需要解压缩
 			{
 			{
 				messageBytes = ZipHelper.Decompress(messageBytes, 6, messageBytes.Length - 6);
 				messageBytes = ZipHelper.Decompress(messageBytes, 6, messageBytes.Length - 6);
 				offset = 0;
 				offset = 0;
@@ -92,7 +92,7 @@ namespace Model
 			{
 			{
 				offset = 6;
 				offset = 6;
 			}
 			}
-			uint rpcId = flagUInt & 0x0fff;
+			uint rpcId = flagUInt & 0x7fffffff;
 			this.RunDecompressedBytes(opcode, rpcId, messageBytes, offset);
 			this.RunDecompressedBytes(opcode, rpcId, messageBytes, offset);
 		}
 		}
 
 
@@ -119,11 +119,11 @@ namespace Model
 
 
 		public Task<Response> CallAsync<Response>(object request, CancellationToken cancellationToken) where Response : IErrorMessage
 		public Task<Response> CallAsync<Response>(object request, CancellationToken cancellationToken) where Response : IErrorMessage
 		{
 		{
-			this.Send(request, ++this.RpcId);
+			this.Send(++RpcId, request);
 
 
 			var tcs = new TaskCompletionSource<Response>();
 			var tcs = new TaskCompletionSource<Response>();
 
 
-			this.requestCallback[this.RpcId] = (bytes, offset, count) =>
+			this.requestCallback[RpcId] = (bytes, offset, count) =>
 			{
 			{
 				try
 				try
 				{
 				{
@@ -141,7 +141,7 @@ namespace Model
 				}
 				}
 			};
 			};
 
 
-			cancellationToken.Register(() => { this.requestCallback.Remove(this.RpcId); });
+			cancellationToken.Register(() => { this.requestCallback.Remove(RpcId); });
 
 
 			return tcs.Task;
 			return tcs.Task;
 		}
 		}
@@ -154,10 +154,10 @@ namespace Model
 		/// <returns></returns>
 		/// <returns></returns>
 		public Task<Response> CallAsync<Response>(object request) where Response : IErrorMessage
 		public Task<Response> CallAsync<Response>(object request) where Response : IErrorMessage
 		{
 		{
-			this.Send(request, ++this.RpcId);
+			this.Send(++RpcId, request);
 
 
 			var tcs = new TaskCompletionSource<Response>();
 			var tcs = new TaskCompletionSource<Response>();
-			this.requestCallback[this.RpcId] = (bytes, offset, count) =>
+			this.requestCallback[RpcId] = (bytes, offset, count) =>
 			{
 			{
 				try
 				try
 				{
 				{
@@ -187,7 +187,7 @@ namespace Model
 		public Task<Response> WaitAsync<Response>(CancellationToken cancellationToken) where Response : class
 		public Task<Response> WaitAsync<Response>(CancellationToken cancellationToken) where Response : class
 		{
 		{
 			var tcs = new TaskCompletionSource<Response>();
 			var tcs = new TaskCompletionSource<Response>();
-			ushort opcode = this.messageHandler.MessageOpcode[typeof(Response)];
+			ushort opcode = this.messageHandler.messageOpcode[typeof(Response)];
 			this.waitCallback[opcode] = (bytes, offset, count) =>
 			this.waitCallback[opcode] = (bytes, offset, count) =>
 			{
 			{
 				try
 				try
@@ -214,7 +214,7 @@ namespace Model
 		public Task<Response> WaitAsync<Response>() where Response : class
 		public Task<Response> WaitAsync<Response>() where Response : class
 		{
 		{
 			var tcs = new TaskCompletionSource<Response>();
 			var tcs = new TaskCompletionSource<Response>();
-			ushort opcode = this.messageHandler.MessageOpcode[typeof(Response)];
+			ushort opcode = this.messageHandler.messageOpcode[typeof(Response)];
 			this.waitCallback[opcode] = (bytes, offset, count) =>
 			this.waitCallback[opcode] = (bytes, offset, count) =>
 			{
 			{
 				try
 				try
@@ -233,12 +233,12 @@ namespace Model
 
 
 		public void Send(object message)
 		public void Send(object message)
 		{
 		{
-			this.Send(message, 0);
+			this.Send(0, message);
 		}
 		}
 
 
-		private void Send(object message, uint rpcId)
+		public void Send(uint rpcId, object message)
 		{
 		{
-			ushort opcode = this.messageHandler.MessageOpcode[message.GetType()];
+			ushort opcode = this.messageHandler.GetOpcode(message.GetType());
 			byte[] opcodeBytes = BitConverter.GetBytes(opcode);
 			byte[] opcodeBytes = BitConverter.GetBytes(opcode);
 			byte[] seqBytes = BitConverter.GetBytes(rpcId);
 			byte[] seqBytes = BitConverter.GetBytes(rpcId);
 			byte[] messageBytes = MongoHelper.ToBson(message);
 			byte[] messageBytes = MongoHelper.ToBson(message);

+ 29 - 10
Unity/Assets/Scripts/Component/MessageHandlerComponent.cs

@@ -27,7 +27,7 @@ namespace Model
 	{
 	{
 		private string AppType;
 		private string AppType;
 		private Dictionary<ushort, List<Action<Entity, byte[], int, int>>> events;
 		private Dictionary<ushort, List<Action<Entity, byte[], int, int>>> events;
-		public Dictionary<Type, ushort> MessageOpcode { get; private set; } = new Dictionary<Type, ushort>();
+		public Dictionary<Type, ushort> messageOpcode { get; private set; } = new Dictionary<Type, ushort>();
 		
 		
 		public void Awake(string appType)
 		public void Awake(string appType)
 		{
 		{
@@ -38,9 +38,26 @@ namespace Model
 		public void Load()
 		public void Load()
 		{
 		{
 			this.events = new Dictionary<ushort, List<Action<Entity, byte[], int, int>>>();
 			this.events = new Dictionary<ushort, List<Action<Entity, byte[], int, int>>>();
-			this.MessageOpcode = new Dictionary<Type, ushort>();
+			this.messageOpcode = new Dictionary<Type, ushort>();
 
 
 			Assembly[] assemblies = Object.ObjectManager.GetAssemblies();
 			Assembly[] assemblies = Object.ObjectManager.GetAssemblies();
+
+			foreach (Assembly assembly in assemblies)
+			{
+				Type[] types = assembly.GetTypes();
+				foreach (Type type in types)
+				{
+					object[] attrs = type.GetCustomAttributes(typeof(OpcodeAttribute), false);
+					if (attrs.Length == 0)
+					{
+						continue;
+					}
+
+					OpcodeAttribute opcodeAttribute = (OpcodeAttribute)attrs[0];
+					this.messageOpcode[type] = opcodeAttribute.Opcode;
+				}
+			}
+
 			foreach (Assembly assembly in assemblies)
 			foreach (Assembly assembly in assemblies)
 			{
 			{
 				Type[] types = assembly.GetTypes();
 				Type[] types = assembly.GetTypes();
@@ -60,22 +77,22 @@ namespace Model
 
 
 					object obj = Activator.CreateInstance(type);
 					object obj = Activator.CreateInstance(type);
 
 
-					IMRegister<MessageHandlerComponent> iMRegister = obj as IMRegister<MessageHandlerComponent>;
+					IMRegister iMRegister = obj as IMRegister;
 					if (iMRegister == null)
 					if (iMRegister == null)
 					{
 					{
 						throw new Exception($"message handler not inherit IEventSync or IEventAsync interface: {obj.GetType().FullName}");
 						throw new Exception($"message handler not inherit IEventSync or IEventAsync interface: {obj.GetType().FullName}");
 					}
 					}
-					iMRegister.Register(this, messageAttribute.Opcode);
+					iMRegister.Register(this);
 				}
 				}
 			}
 			}
 		}
 		}
 
 
-		public void RegisterOpcode(Type type, ushort opcode)
+		public ushort GetOpcode(Type type)
 		{
 		{
-			this.MessageOpcode[type] = opcode;
+			return this.messageOpcode[type];
 		}
 		}
 
 
-		public void Register<T>(ushort opcode, Action<Entity, T> action)
+		public void RegisterHandler<T>(ushort opcode, Action<Entity, T, uint> action)
 		{
 		{
 			if (!this.events.ContainsKey(opcode))
 			if (!this.events.ContainsKey(opcode))
 			{
 			{
@@ -86,8 +103,10 @@ namespace Model
 			actions.Add((entity, messageBytes, offset, count) =>
 			actions.Add((entity, messageBytes, offset, count) =>
 			{
 			{
 				T t;
 				T t;
+				uint rpcId;
 				try
 				try
-			    {
+				{
+					rpcId = BitConverter.ToUInt32(messageBytes, 2) & 0x7fffffff;
                     t = MongoHelper.FromBson<T>(messageBytes, offset, count);
                     t = MongoHelper.FromBson<T>(messageBytes, offset, count);
                 }
                 }
 			    catch (Exception ex)
 			    catch (Exception ex)
@@ -95,7 +114,7 @@ namespace Model
 			        throw new Exception("解释消息失败:" + opcode, ex);
 			        throw new Exception("解释消息失败:" + opcode, ex);
 			    }
 			    }
 
 
-				action(entity, t);
+				action(entity, t, rpcId);
 			});
 			});
 		}
 		}
 
 
@@ -105,7 +124,7 @@ namespace Model
 			List<Action<Entity, byte[], int, int>> actions;
 			List<Action<Entity, byte[], int, int>> actions;
 			if (!this.events.TryGetValue(opcode, out actions))
 			if (!this.events.TryGetValue(opcode, out actions))
 			{
 			{
-				Log.Error($"消息{opcode}没有处理");
+				Log.Error($"消息 {opcode} 没有处理");
 				return;
 				return;
 			}
 			}
 
 

+ 5 - 5
Unity/Assets/Scripts/Component/NetworkComponent.cs

@@ -75,11 +75,9 @@ namespace Model
 				AChannel channel = await this.Service.AcceptChannel();
 				AChannel channel = await this.Service.AcceptChannel();
 
 
 				Entity session = new Entity();
 				Entity session = new Entity();
-				this.Add(session);
-
 				channel.ErrorCallback += (c, e) => { this.Remove(session.Id); };
 				channel.ErrorCallback += (c, e) => { this.Remove(session.Id); };
-
-				session.AddComponent<MessageComponent, MessageHandlerComponent, AChannel>(this.GetComponent<MessageHandlerComponent>(), channel);
+				session.AddComponent<MessageComponent, AChannel>(channel);
+				this.Add(session);
 			}
 			}
 		}
 		}
 
 
@@ -120,9 +118,11 @@ namespace Model
 			string host = ss[0];
 			string host = ss[0];
 			AChannel channel = this.Service.ConnectChannel(host, port);
 			AChannel channel = this.Service.ConnectChannel(host, port);
 			session = new Entity();
 			session = new Entity();
+			channel.ErrorCallback += (c, e) => { this.Remove(session.Id); };
+			session.AddComponent<MessageComponent, AChannel>(channel);
 			this.Add(session);
 			this.Add(session);
 
 
-			channel.ErrorCallback += (c, e) => { this.Remove(session.Id); };
+			
 			return session;
 			return session;
 		}
 		}
 
 

+ 2 - 0
Unity/Assets/Scripts/Message/Message.cs

@@ -3,6 +3,7 @@ using MongoDB.Bson.Serialization.Attributes;
 
 
 namespace Model
 namespace Model
 {
 {
+	[Opcode(1)]
 	[BsonIgnoreExtraElements]
 	[BsonIgnoreExtraElements]
 	public class C2S_Login
 	public class C2S_Login
 	{
 	{
@@ -10,6 +11,7 @@ namespace Model
 		public string Password;
 		public string Password;
 	}
 	}
 
 
+	[Opcode(2)]
 	[BsonIgnoreExtraElements]
 	[BsonIgnoreExtraElements]
 	public class S2C_Login: IErrorMessage
 	public class S2C_Login: IErrorMessage
 	{
 	{

+ 0 - 10
Unity/Assets/Scripts/Message/Opcode.cs

@@ -1,10 +0,0 @@
-// 本文件由工具自动生成,请勿直接改动
-namespace Model
-{
-	public static class Opcode
-	{
-		public const ushort C2S_Login = 1;
-		public const ushort S2C_InitBuffInfo = 2;
-		public const ushort S2C_StartGame = 4;
-	}
-}

+ 1 - 1
Unity/Assets/Scripts/Message/OpcodeHelper.cs

@@ -6,7 +6,7 @@ namespace Model
 	{
 	{
 		private static readonly HashSet<ushort> needDebugLogMessageSet = new HashSet<ushort>
 		private static readonly HashSet<ushort> needDebugLogMessageSet = new HashSet<ushort>
 		{
 		{
-			Opcode.S2C_StartGame,
+			1,
 		};
 		};
 
 
 		public static bool IsNeedDebugLogMessage(ushort opcode)
 		public static bool IsNeedDebugLogMessage(ushort opcode)

+ 1 - 0
Unity/Unity.CSharp.Plugins.csproj

@@ -101,6 +101,7 @@
     <Compile Include="Assets\Plugins\Base\Message\AMEvent.cs" />
     <Compile Include="Assets\Plugins\Base\Message\AMEvent.cs" />
     <Compile Include="Assets\Plugins\Base\Message\IErrorMessage.cs" />
     <Compile Include="Assets\Plugins\Base\Message\IErrorMessage.cs" />
     <Compile Include="Assets\Plugins\Base\Message\IMRegister.cs" />
     <Compile Include="Assets\Plugins\Base\Message\IMRegister.cs" />
+    <Compile Include="Assets\Plugins\Base\Message\OpcodeAttribute.cs" />
     <Compile Include="Assets\Plugins\Base\Message\MessageAttribute.cs" />
     <Compile Include="Assets\Plugins\Base\Message\MessageAttribute.cs" />
     <Compile Include="Assets\Plugins\Base\Message\RpcException.cs" />
     <Compile Include="Assets\Plugins\Base\Message\RpcException.cs" />
     <Compile Include="Assets\Plugins\Base\MultiMap.cs" />
     <Compile Include="Assets\Plugins\Base\MultiMap.cs" />

+ 0 - 1
Unity/Unity.CSharp.csproj

@@ -100,7 +100,6 @@
     <Compile Include="Assets\Scripts\Message\AppType.cs" />
     <Compile Include="Assets\Scripts\Message\AppType.cs" />
     <Compile Include="Assets\Scripts\Message\ErrorCode.cs" />
     <Compile Include="Assets\Scripts\Message\ErrorCode.cs" />
     <Compile Include="Assets\Scripts\Message\Message.cs" />
     <Compile Include="Assets\Scripts\Message\Message.cs" />
-    <Compile Include="Assets\Scripts\Message\Opcode.cs" />
     <Compile Include="Assets\Scripts\Message\OpcodeHelper.cs" />
     <Compile Include="Assets\Scripts\Message\OpcodeHelper.cs" />
     <Compile Include="Assets\Scripts\Other\EntityType.cs" />
     <Compile Include="Assets\Scripts\Other\EntityType.cs" />
     <Compile Include="Assets\Scripts\Other\GameException.cs" />
     <Compile Include="Assets\Scripts\Other\GameException.cs" />