chore: get init to only get for events
This commit is contained in:
@@ -4,9 +4,9 @@ namespace Syntriax.Engine.Physics2D;
|
||||
|
||||
public abstract class Collider2DBehaviourBase : Behaviour2D, ICollider2D
|
||||
{
|
||||
public Event<ICollider2D, CollisionDetectionInformation> OnCollisionDetected { get; init; } = new();
|
||||
public Event<ICollider2D, CollisionDetectionInformation> OnCollisionResolved { get; init; } = new();
|
||||
public Event<ICollider2D, ICollider2D> OnTriggered { get; init; } = new();
|
||||
public Event<ICollider2D, CollisionDetectionInformation> OnCollisionDetected { get; } = new();
|
||||
public Event<ICollider2D, CollisionDetectionInformation> OnCollisionResolved { get; } = new();
|
||||
public Event<ICollider2D, ICollider2D> OnTriggered { get; } = new();
|
||||
|
||||
private readonly Event<IBehaviourController, IBehaviourController.BehaviourAddedArguments>.EventHandler cachedOnBehaviourAddedToController = null!;
|
||||
private readonly Event<IBehaviourController, IBehaviourController.BehaviourRemovedArguments>.EventHandler cachedOnBehaviourRemovedFromController = null!;
|
||||
|
@@ -4,8 +4,8 @@ namespace Syntriax.Engine.Physics2D;
|
||||
|
||||
public class PhysicsEngine2D : UniverseObject, IPhysicsEngine2D
|
||||
{
|
||||
public Event<IPhysicsEngine2D, float> OnPhysicsIteration { get; init; } = new();
|
||||
public Event<IPhysicsEngine2D, float> OnPhysicsStep { get; init; } = new();
|
||||
public Event<IPhysicsEngine2D, float> OnPhysicsIteration { get; } = new();
|
||||
public Event<IPhysicsEngine2D, float> OnPhysicsStep { get; } = new();
|
||||
|
||||
private readonly Event<IUniverse, IUniverse.UpdateArguments>.EventHandler cachedOnPreUpdate = null!;
|
||||
|
||||
|
@@ -6,8 +6,8 @@ namespace Syntriax.Engine.Physics2D;
|
||||
|
||||
public class PhysicsEngine2DStandalone : IPhysicsEngine2D
|
||||
{
|
||||
public Event<IPhysicsEngine2D, float> OnPhysicsIteration { get; init; } = new();
|
||||
public Event<IPhysicsEngine2D, float> OnPhysicsStep { get; init; } = new();
|
||||
public Event<IPhysicsEngine2D, float> OnPhysicsIteration { get; } = new();
|
||||
public Event<IPhysicsEngine2D, float> OnPhysicsStep { get; } = new();
|
||||
|
||||
private readonly Event<IBehaviourController, IBehaviourController.BehaviourAddedArguments>.EventHandler cachedOnBehaviourAdded = null!;
|
||||
private readonly Event<IBehaviourController, IBehaviourController.BehaviourRemovedArguments>.EventHandler cachedOnBehaviourRemoved = null!;
|
||||
|
Reference in New Issue
Block a user