refactor: removed unnecessary overrides from Behaviour class

This commit is contained in:
2025-06-01 14:31:05 +03:00
parent f31b84f519
commit ac620264b1
7 changed files with 20 additions and 122 deletions

View File

@@ -3,7 +3,7 @@ using Syntriax.Engine.Core.Serialization;
namespace Syntriax.Engine.Systems.StateMachine;
public class StateMachine : Behaviour
public class StateMachine : Behaviour, IUpdate
{
public Event<StateMachine, StateChangedArguments> OnStateChanged { get; } = new();
@@ -44,7 +44,7 @@ public class StateMachine : Behaviour
State = nextState;
}
protected override void OnUpdate()
public void Update()
{
if (State is null)
return;