This commit is contained in:
2025-05-30 16:05:49 +03:00
committed by Syntriax
parent 846aa75dd5
commit b5140a94de
57 changed files with 437 additions and 462 deletions

View File

@@ -2,9 +2,9 @@ namespace Syntriax.Engine.Core;
public class StateEnable : IStateEnable
{
public Event<IStateEnable, bool> OnEnabledChanged { get; private set; } = new();
public Event<IHasEntity> OnEntityAssigned { get; private set; } = new();
public Event<IAssignable>? OnUnassigned { get; private set; } = new();
public Event<IStateEnable, IStateEnable.EnabledChangedArguments> OnEnabledChanged { get; init; } = new();
public Event<IHasEntity> OnEntityAssigned { get; init; } = new();
public Event<IAssignable>? OnUnassigned { get; init; } = new();
private bool _enabled = true;
private IEntity _entity = null!;
@@ -21,7 +21,7 @@ public class StateEnable : IStateEnable
bool previousState = _enabled;
_enabled = value;
OnEnabledChanged?.Invoke(this, previousState);
OnEnabledChanged?.Invoke(this, new(previousState));
}
}