Syntriax.Engine/Engine.Input/Abstract/IButtonInputs.cs

17 lines
565 B
C#

using Syntriax.Engine.Core.Abstract;
namespace Syntriax.Engine.Input;
public interface IButtonInputs<T> : IAssignableStateEnable
{
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);
}