chore: bumped dotnet version to 10

This commit is contained in:
2026-01-23 12:16:07 +03:00
parent 097f1897c2
commit 90e59802c6
32 changed files with 210 additions and 257 deletions

View File

@@ -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)

View File

@@ -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;
}