perf: regular events to custom events
This commit is contained in:
@@ -10,7 +10,7 @@ public class State : BaseEntity, IState
|
||||
public event IState.StateTransitionedFromEventHandler? OnStateTransitionedFrom = null;
|
||||
public event IState.StateTransitionedToEventHandler? OnStateTransitionedTo = null;
|
||||
public event IState.StateTransitionReadyEventHandler? OnStateTransitionReady = null;
|
||||
public event INameable.NameChangedEventHandler? OnNameChanged = null;
|
||||
public Event<INameable, string> OnNameChanged { get; private set; } = new();
|
||||
|
||||
private readonly List<StateTransition> transitions = [];
|
||||
private readonly Dictionary<string, StateTransition> possibleTransitions = [];
|
||||
|
@@ -7,7 +7,8 @@ public abstract class StateBehaviourBase : Behaviour, IState
|
||||
public event IState.StateUpdateEventHandler? OnStateUpdate = null;
|
||||
public event IState.StateTransitionedFromEventHandler? OnStateTransitionedFrom = null;
|
||||
public event IState.StateTransitionedToEventHandler? OnStateTransitionedTo = null;
|
||||
public event INameable.NameChangedEventHandler? OnNameChanged = null;
|
||||
|
||||
public Event<INameable, string> OnNameChanged { get; private set; } = new();
|
||||
|
||||
public abstract event IState.StateTransitionReadyEventHandler? OnStateTransitionReady;
|
||||
|
||||
|
Reference in New Issue
Block a user