diff --git a/README.md b/README.md index 51109af..62a6e70 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,15 @@ public class MainMenuState : StateBase return Transition.GoTo(); } } + +public class GameplayState : StateBase +{ + public override async UniTask Execute(CancellationToken token) + { + // Add your state logic here + return Transition.GoBack(); + } +} ``` Detailed information about creating states is available [here](#state-creating). @@ -80,6 +89,7 @@ available [here](#state-creating). ```csharp builder.RegisterStateMachine(); builder.RegisterState(); +builder.RegisterState(); ``` Additional information on DI configuration is available [here](#integrations). @@ -93,7 +103,7 @@ Additional information on DI configuration is available [here](#integrations). public async void Run() { var stateMachine = StateMachineHelper.CreateStateMachine(_objectResolver.ToTypeResolver()); - await stateMachine.Execute(_ctx.Token); + await stateMachine.Execute(_ctx.Token); } } ```