refactor: network entity packets
This commit is contained in:
6
Shared/Network/Abstract/IEntityNetworkPacket.cs
Normal file
6
Shared/Network/Abstract/IEntityNetworkPacket.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace Syntriax.Engine.Network;
|
||||
|
||||
public interface IEntityNetworkPacket : INetworkPacket
|
||||
{
|
||||
string EntityId { get; }
|
||||
}
|
@@ -6,8 +6,8 @@ public interface INetworkCommunicator
|
||||
{
|
||||
INetworkCommunicator Stop();
|
||||
|
||||
void SubscribeToPackets<T>(Action<T> callback);
|
||||
void UnsubscribeFromPackets<T>(Action<T> callback);
|
||||
INetworkCommunicator SubscribeToPackets<T>(Action<T, string> callback);
|
||||
INetworkCommunicator UnsubscribeFromPackets<T>(Action<T, string> callback);
|
||||
}
|
||||
|
||||
public interface INetworkCommunicatorClient : INetworkCommunicator
|
||||
|
@@ -4,5 +4,5 @@ namespace Syntriax.Engine.Network;
|
||||
|
||||
public interface INetworkEntity : IEntity
|
||||
{
|
||||
void ReceiveData(object data);
|
||||
void ReceiveDataClient<T>(T data);
|
||||
}
|
||||
|
@@ -6,8 +6,6 @@ namespace Syntriax.Engine.Network;
|
||||
|
||||
public interface INetworkManager
|
||||
{
|
||||
INetworkCommunicator NetworkCommunicator { get; }
|
||||
|
||||
IReadOnlyDictionary<string, INetworkEntity> NetworkEntities { get; }
|
||||
IBehaviourCollector<INetworkEntity> NetworkEntityCollector { get; }
|
||||
}
|
||||
|
Reference in New Issue
Block a user