refactor: shortened IButtonInputs event declaration
This commit is contained in:
@@ -4,15 +4,17 @@ namespace Engine.Systems.Input;
|
||||
|
||||
public interface IButtonInputs<T> : IHasStateEnable
|
||||
{
|
||||
Event<IButtonInputs<T>, ButtonCallbackArguments> OnAnyButtonPressed { get; }
|
||||
Event<IButtonInputs<T>, ButtonCallbackArguments> OnAnyButtonReleased { get; }
|
||||
InputEvent OnAnyButtonPressed { get; }
|
||||
InputEvent OnAnyButtonReleased { get; }
|
||||
|
||||
void RegisterOnPress(T button, Event<IButtonInputs<T>, ButtonCallbackArguments>.EventHandler callback);
|
||||
void UnregisterOnPress(T button, Event<IButtonInputs<T>, ButtonCallbackArguments>.EventHandler callback);
|
||||
void RegisterOnRelease(T button, Event<IButtonInputs<T>, ButtonCallbackArguments>.EventHandler callback);
|
||||
void UnregisterOnRelease(T button, Event<IButtonInputs<T>, ButtonCallbackArguments>.EventHandler callback);
|
||||
void RegisterOnPress(T button, InputEvent.EventHandler callback);
|
||||
void UnregisterOnPress(T button, InputEvent.EventHandler callback);
|
||||
void RegisterOnRelease(T button, InputEvent.EventHandler callback);
|
||||
void UnregisterOnRelease(T button, InputEvent.EventHandler callback);
|
||||
|
||||
bool IsPressed(T button);
|
||||
|
||||
readonly record struct ButtonCallbackArguments(T Button);
|
||||
|
||||
class InputEvent : Event<IButtonInputs<T>, ButtonCallbackArguments>;
|
||||
}
|
||||
|
Reference in New Issue
Block a user