chore: bumped dotnet version to 10
This commit is contained in:
@@ -29,22 +29,21 @@ public class NetworkManager : Behaviour, IEnterUniverse, IExitUniverse, INetwork
|
||||
private readonly BehaviourCollector<INetworkEntity> _networkEntityCollector = new();
|
||||
public IBehaviourCollector<INetworkEntity> NetworkEntityCollector => _networkEntityCollector;
|
||||
|
||||
private INetworkCommunicator _networkCommunicator = null!;
|
||||
public INetworkCommunicator NetworkCommunicator
|
||||
{
|
||||
get => _networkCommunicator;
|
||||
get;
|
||||
set
|
||||
{
|
||||
if (_networkCommunicator == value)
|
||||
if (field == value)
|
||||
return;
|
||||
|
||||
INetworkCommunicator? previousCommunicator = _networkCommunicator;
|
||||
_networkCommunicator = value;
|
||||
INetworkCommunicator? previousCommunicator = field;
|
||||
field = value;
|
||||
|
||||
if (previousCommunicator is not null) UnsubscribeCommunicatorMethods(previousCommunicator);
|
||||
if (_networkCommunicator is not null) SubscribeCommunicatorMethods(_networkCommunicator);
|
||||
if (field is not null) SubscribeCommunicatorMethods(field);
|
||||
}
|
||||
}
|
||||
} = null!;
|
||||
|
||||
#region Communicator Subscriptions
|
||||
private void SubscribeCommunicatorMethods(INetworkCommunicator networkCommunicator)
|
||||
|
||||
@@ -2,15 +2,14 @@ namespace Engine.Systems.Network;
|
||||
|
||||
public static class TypeHasher<T>
|
||||
{
|
||||
private static long _fnv1a = 0;
|
||||
public static long FNV1a
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_fnv1a == 0)
|
||||
_fnv1a = Hasher.FNV1a(typeof(T).FullName ?? typeof(T).Name);
|
||||
if (field == 0)
|
||||
field = Hasher.FNV1a(typeof(T).FullName ?? typeof(T).Name);
|
||||
|
||||
return _fnv1a;
|
||||
return field;
|
||||
}
|
||||
}
|
||||
} = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user