chore: Compiler Warnings Fixed

This commit is contained in:
2023-11-27 17:41:21 +03:00
parent 5512696a04
commit 8ec918ca04
2 changed files with 7 additions and 5 deletions

View File

@@ -34,9 +34,11 @@ public class MovementBoxBehaviour(Keys Up, Keys Down, float High, float Low, flo
protected override void OnInitialize()
{
if (!BehaviourController.TryGetBehaviour(out inputs))
if (!BehaviourController.TryGetBehaviour<IKeyboardInputs>(out var behaviourResult))
throw new Exception($"{nameof(IKeyboardInputs)} is missing on ${GameObject.Name}.");
inputs = behaviourResult;
inputs.RegisterOnPress(Up, OnUpPressed);
inputs.RegisterOnRelease(Up, OnUpReleased);