Separate interfaces for entities that the clients/server can send updates for (+ placeholder implementations)

May or may not be useful
This commit is contained in:
Regalis
2016-09-01 20:39:52 +03:00
parent f845a21de8
commit 0d68467464
6 changed files with 107 additions and 52 deletions

View File

@@ -0,0 +1,26 @@
using Lidgren.Network;
namespace Barotrauma.Networking
{
/// <summary>
/// Interface for entities that the clients can send information of to the server
/// </summary>
interface IClientSerializable
{
ushort NetStateID { get; }
void ClientWrite(NetOutgoingMessage msg);
void ServerRead(NetIncomingMessage msg);
}
/// <summary>
/// Interface for entities that the server can send information of to the clients
/// </summary>
interface IServerSerializable
{
ushort NetStateID { get; }
void ServerWrite(NetOutgoingMessage msg);
void ClientRead(NetIncomingMessage msg);
}
}