refactor: added pre, regular & post physics update interfaces

This commit is contained in:
2025-05-24 13:29:21 +03:00
parent b1970d93f9
commit 877a004a13
4 changed files with 46 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
using Syntriax.Engine.Core;
namespace Syntriax.Engine.Physics2D;
/// <summary>
/// Represents a <see cref="IBehaviour"/> that listens to the phase after the physics simulation phase.
/// </summary>
public interface IPostPhysicsUpdate : IBehaviour
{
/// <summary>
/// Execute logic that should occur after the physics simulation has been updated.
/// </summary>
/// <param name="delta">The time elapsed since the last physics update, typically in seconds.</param>
void PostPhysicsUpdate(float delta);
}

View File

@@ -0,0 +1,15 @@
using Syntriax.Engine.Core;
namespace Syntriax.Engine.Physics2D;
/// <summary>
/// Represents a <see cref="IBehaviour"/> that listens to the phase before the physics simulation phase.
/// </summary>
public interface IPrePhysicsUpdate : IBehaviour
{
/// <summary>
/// Execute logic that should occur before the physics simulation is updated.
/// </summary>
/// <param name="delta">The time elapsed since the last physics update, typically in seconds.</param>
void PrePhysicsUpdate(float delta);
}