19 lines
672 B
C#
19 lines
672 B
C#
using Syntriax.Engine.Core.Abstract;
|
|
|
|
namespace Syntriax.Engine.Input;
|
|
|
|
public interface IButtonInputs<T> : IAssignableStateEnable
|
|
{
|
|
event ButtonCallbackEventHandler? OnAnyButtonPressed;
|
|
event ButtonCallbackEventHandler? OnAnyButtonReleased;
|
|
|
|
void RegisterOnPress(T button, ButtonCallbackEventHandler callback);
|
|
void UnregisterOnPress(T button, ButtonCallbackEventHandler callback);
|
|
void RegisterOnRelease(T button, ButtonCallbackEventHandler callback);
|
|
void UnregisterOnRelease(T button, ButtonCallbackEventHandler callback);
|
|
|
|
bool IsPressed(T button);
|
|
|
|
delegate void ButtonCallbackEventHandler(IButtonInputs<T> buttonInputs, T button);
|
|
}
|