wip: Network
This commit is contained in:
@@ -12,4 +12,7 @@ public interface INetworkBehaviour : IBehaviour
|
||||
bool IsClient { get; }
|
||||
|
||||
INetworkCommunicator NetworkCommunicator { get; }
|
||||
|
||||
public void RequestAssignment();
|
||||
public void ReleaseAssignment();
|
||||
}
|
||||
|
@@ -15,7 +15,8 @@ public interface INetworkCommunicator
|
||||
void PollEvents();
|
||||
void Stop();
|
||||
|
||||
void RegisterEntityListener(IEntity entity, Action<NetPacketReader> onDataReceived);
|
||||
void RegisterEntityListener(IEntity entity, Action<NetPacketReader, NetPeer> onDataReceived);
|
||||
void UnregisterEntityListener(IEntity entity);
|
||||
NetDataWriter GetEntityWriter(IEntity entity);
|
||||
NetDataWriter GetMessageWriter(IEntity entity);
|
||||
}
|
||||
|
@@ -1,7 +1,10 @@
|
||||
using System;
|
||||
|
||||
namespace Syntriax.Engine.Network.Abstract;
|
||||
|
||||
internal interface INetworkEntity
|
||||
{
|
||||
Action<INetworkEntity, int> OnNetworkIdChanged { get; set; }
|
||||
int NetworkId { get; set; }
|
||||
|
||||
void SetNetworkId(int id);
|
||||
|
@@ -1,14 +1,10 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using Syntriax.Engine.Core.Abstract;
|
||||
|
||||
namespace Syntriax.Engine.Network.Abstract;
|
||||
|
||||
public interface INetworkManager
|
||||
{
|
||||
Action<IGameObject>? OnNetworkGameObjectInstantiated { get; set; }
|
||||
// Action<IGameObject>? OnNetworkGameObjectInstantiated { get; set; }
|
||||
|
||||
INetworkCommunicator Communicator { get; }
|
||||
INetworkCommunicator NetworkCommunicator { get; }
|
||||
|
||||
Task<T> Instantiate<T>(params object?[]? args) where T : class, IGameObject;
|
||||
// Task<T> Instantiate<T>(params object?[]? args) where T : class, IGameObject;
|
||||
}
|
||||
|
Reference in New Issue
Block a user