refactor: IButtonInputs from Actions to Delegate
This commit is contained in:
parent
ef21cdf213
commit
15984bcc06
|
@ -4,11 +4,13 @@ namespace Syntriax.Engine.Input;
|
|||
|
||||
public interface IButtonInputs<T> : IAssignableStateEnable
|
||||
{
|
||||
void RegisterOnPress(T button, Action<IButtonInputs<T>, T> callback);
|
||||
void UnregisterOnPress(T button, Action<IButtonInputs<T>, T> callback);
|
||||
void RegisterOnRelease(T button, Action<IButtonInputs<T>, T> callback);
|
||||
void UnregisterOnRelease(T button, Action<IButtonInputs<T>, 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<T> buttonInputs, T button);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue