refactor: added pre, regular & post physics update interfaces
This commit is contained in:
15
Engine.Physics2D/Abstract/Updates/IPostPhysicsUpdate.cs
Normal file
15
Engine.Physics2D/Abstract/Updates/IPostPhysicsUpdate.cs
Normal 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);
|
||||
}
|
15
Engine.Physics2D/Abstract/Updates/IPrePhysicsUpdate.cs
Normal file
15
Engine.Physics2D/Abstract/Updates/IPrePhysicsUpdate.cs
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user