chore: get init to only get for events

This commit is contained in:
2025-05-30 20:13:32 +03:00
parent 0d61735ae5
commit 1b123a3cc0
21 changed files with 82 additions and 82 deletions

View File

@@ -3,9 +3,9 @@ namespace Syntriax.Engine.Core;
[System.Diagnostics.DebuggerDisplay("{GetType().Name, nq}, Priority: {Priority}, Initialized: {Initialized}")]
public abstract class BehaviourBase : BaseEntity, IBehaviour
{
public Event<IBehaviour, IBehaviour.PriorityChangedArguments> OnPriorityChanged { get; init; } = new();
public Event<IActive, IActive.ActiveChangedArguments> OnActiveChanged { get; init; } = new();
public Event<IHasBehaviourController> OnBehaviourControllerAssigned { get; init; } = new();
public Event<IBehaviour, IBehaviour.PriorityChangedArguments> OnPriorityChanged { get; } = new();
public Event<IActive, IActive.ActiveChangedArguments> OnActiveChanged { get; } = new();
public Event<IHasBehaviourController> OnBehaviourControllerAssigned { get; } = new();
private readonly Event<IHasUniverseObject>.EventHandler cachedOnUniverseObjectAssigned = null!;
private readonly Event<IActive, IActive.ActiveChangedArguments>.EventHandler cachedOnUniverseObjectActiveChanged = null!;