feat: OnFirstActiveFrame of Engine.Core

This commit is contained in:
2023-11-30 10:49:11 +03:00
parent bbc15cba92
commit 9ec92c1beb
2 changed files with 2 additions and 2 deletions

2
Engine

Submodule Engine updated: d2881e94df...bb6990a80c

View File

@@ -32,7 +32,7 @@ public class MovementBoxBehaviour(Keys Up, Keys Down, float High, float Low, flo
GameObject.Transform.Position = new Vector2(GameObject.Transform.Position.X, MathF.Max(MathF.Min(GameObject.Transform.Position.Y, High), Low));
}
protected override void OnInitialize()
protected override void OnFirstActiveFrame(GameTime time)
{
if (!BehaviourController.TryGetBehaviour<IKeyboardInputs>(out var behaviourResult))
throw new Exception($"{nameof(IKeyboardInputs)} is missing on ${GameObject.Name}.");