chore: updated engine
This commit is contained in:
@@ -72,8 +72,8 @@ public class KeyboardInputsBehaviour : Behaviour, IButtonInputs<Keys>
|
||||
if (WasPressed(currentlyPressedKey))
|
||||
continue;
|
||||
|
||||
action.Invoke(this, currentlyPressedKey);
|
||||
OnAnyButtonPressed?.Invoke(this, currentlyPressedKey);
|
||||
action.InvokeSafe(this, currentlyPressedKey);
|
||||
OnAnyButtonPressed?.InvokeSafe(this, currentlyPressedKey);
|
||||
}
|
||||
|
||||
for (int i = 0; i < cachePressedPreviouslyCount; i++)
|
||||
@@ -86,8 +86,8 @@ public class KeyboardInputsBehaviour : Behaviour, IButtonInputs<Keys>
|
||||
if (IsPressed(previouslyPressedKey))
|
||||
continue;
|
||||
|
||||
action.Invoke(this, previouslyPressedKey);
|
||||
OnAnyButtonReleased?.Invoke(this, previouslyPressedKey);
|
||||
action.InvokeSafe(this, previouslyPressedKey);
|
||||
OnAnyButtonReleased?.InvokeSafe(this, previouslyPressedKey);
|
||||
}
|
||||
|
||||
Array.Copy(cachePressedCurrently, cachePressedPreviously, cachePressedCurrentlyCount);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
using Pong.Platforms.Desktop;
|
||||
using Syntriax.Engine.Core;
|
||||
|
||||
Syntriax.Engine.Core.Abstract.IHierarchyObject hierarchyObject = Syntriax.Engine.Core.Factory.HierarchyObjectFactory.Instantiate().SetHierarchyObject("Desktop HO");
|
||||
hierarchyObject.BehaviourController.AddBehaviour<KeyboardInputsBehaviour>();
|
||||
using var game = new Pong.GamePong(hierarchyObject);
|
||||
Syntriax.Engine.Core.Abstract.IUniverseObject universeObject = Syntriax.Engine.Core.Factory.UniverseObjectFactory.Instantiate().SetUniverseObject("Desktop HO");
|
||||
universeObject.BehaviourController.AddBehaviour<KeyboardInputsBehaviour>();
|
||||
using var game = new Pong.GamePong(universeObject);
|
||||
game.Run();
|
||||
|
Reference in New Issue
Block a user