Development Merge 2025.11.03 #6

Merged
Syntriax merged 21 commits from development into main 2025-11-03 13:07:39 +01:00
2 changed files with 32 additions and 0 deletions
Showing only changes of commit 4ed049573a - Show all commits

View File

@@ -0,0 +1,16 @@
using Engine.Core;
namespace Engine.Systems.Network;
/// <summary>
/// Basic client behaviour that finds the <see cref="INetworkCommunicatorClient"/> in the universe in it's first active frame.
/// <br/>
/// Disclaimer: It implements <see cref="IFirstFrameUpdate"/> and <see cref="ILastFrameUpdate"/> in virtual methods.
/// </summary>
public class ClientBehaviour : Behaviour, IFirstFrameUpdate, ILastFrameUpdate
{
public INetworkCommunicatorClient Client { get; private set; } = null!;
public virtual void FirstActiveFrame() => Client = Universe.FindRequiredBehaviour<INetworkCommunicatorClient>();
public virtual void LastActiveFrame() => Client = null!;
}

View File

@@ -0,0 +1,16 @@
using Engine.Core;
namespace Engine.Systems.Network;
/// <summary>
/// Basic server behaviour that finds the <see cref="INetworkCommunicatorServer"/> in the universe in it's first active frame.
/// <br/>
/// Disclaimer: It implements <see cref="IFirstFrameUpdate"/> and <see cref="ILastFrameUpdate"/> in virtual methods.
/// </summary>
public class ServerBehaviour : Behaviour, IFirstFrameUpdate, ILastFrameUpdate
{
public INetworkCommunicatorServer Server { get; private set; } = null!;
public virtual void FirstActiveFrame() => Server = Universe.FindRequiredBehaviour<INetworkCommunicatorServer>();
public virtual void LastActiveFrame() => Server = null!;
}