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:
26
Subsurface/Source/Networking/INetSerializable.cs
Normal file
26
Subsurface/Source/Networking/INetSerializable.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user