From 15984bcc06ae3b00d1d8662906f183a91b0bcb04 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Wed, 25 Sep 2024 14:36:57 +0300 Subject: [PATCH] refactor: IButtonInputs from Actions to Delegate --- Engine.Input/Abstract/IButtonInputs.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Engine.Input/Abstract/IButtonInputs.cs b/Engine.Input/Abstract/IButtonInputs.cs index ab67252..7f6fa93 100644 --- a/Engine.Input/Abstract/IButtonInputs.cs +++ b/Engine.Input/Abstract/IButtonInputs.cs @@ -4,11 +4,13 @@ namespace Syntriax.Engine.Input; public interface IButtonInputs : IAssignableStateEnable { - void RegisterOnPress(T button, Action, T> callback); - void UnregisterOnPress(T button, Action, T> callback); - void RegisterOnRelease(T button, Action, T> callback); - void UnregisterOnRelease(T button, Action, T> callback); + void RegisterOnPress(T button, ButtonCallbackDelegate callback); + void UnregisterOnPress(T button, ButtonCallbackDelegate callback); + void RegisterOnRelease(T button, ButtonCallbackDelegate callback); + void UnregisterOnRelease(T button, ButtonCallbackDelegate callback); bool IsPressed(T button); bool WasPressed(T button); + + delegate void ButtonCallbackDelegate(IButtonInputs buttonInputs, T button); }