19 lines
672 B
C#
Raw Normal View History

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);
}