feat: IPhysicsEngine2D Events
This commit is contained in:
@@ -5,6 +5,16 @@ namespace Syntriax.Engine.Physics2D.Abstract;
|
||||
/// </summary>
|
||||
public interface IPhysicsEngine2D
|
||||
{
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="IPhysicsEngine2D"/> has done a single physics iteration.
|
||||
/// </summary>
|
||||
event OnPhysicsIterationDelegate? OnPhysicsIteration;
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when the <see cref="IPhysicsEngine2D"/> has done a full physics step/>.
|
||||
/// </summary>
|
||||
event OnPhysicsStepDelegate? OnPhysicsStep;
|
||||
|
||||
/// <summary>
|
||||
/// The number of iterations the <see cref="IPhysicsEngine2D"/> performs per step.
|
||||
/// </summary>
|
||||
@@ -15,4 +25,7 @@ public interface IPhysicsEngine2D
|
||||
/// </summary>
|
||||
/// <param name="deltaTime">The time step.</param>
|
||||
void Step(float deltaTime);
|
||||
|
||||
delegate void OnPhysicsIterationDelegate(IPhysicsEngine2D sender, float iterationDeltaTime);
|
||||
delegate void OnPhysicsStepDelegate(IPhysicsEngine2D sender, float stepDeltaTime);
|
||||
}
|
||||
|
Reference in New Issue
Block a user