From cadbc455e02f05287ceca89ba86d633c3c695314 Mon Sep 17 00:00:00 2001 From: Dzmitry Bazyleu Date: Thu, 12 Dec 2024 19:09:35 +0100 Subject: [PATCH] Fix Getting Started examples in documentation --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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); } } ```