mirror of
https://github.com/Bragin-Stepan/project-entity.git
synced 2026-03-02 14:29:23 +00:00
19 lines
506 B
C#
19 lines
506 B
C#
using _Project.Develop.Runtime.Utils.ReactiveManagement.Event;
|
|
|
|
namespace Assets._Project.Develop.Runtime.Utilities.StateMachineCore
|
|
{
|
|
public abstract class State : IState
|
|
{
|
|
private ReactiveEvent _entered = new();
|
|
private ReactiveEvent _exited = new();
|
|
|
|
public IReadOnlyEvent Entered => _entered;
|
|
|
|
public IReadOnlyEvent Exited => _exited;
|
|
|
|
public virtual void Enter() => _entered.Invoke();
|
|
|
|
public virtual void Exit() => _exited.Invoke();
|
|
}
|
|
}
|