![]() |
Style Slasher
A dressup combat roguelike created by Scrungle Studios for the 2025 Swinburne Capstone project.
|
A general InputHandler for 2-dimension analogue stick InputActions, that fires each possible direction as a single event. More...
Classes | |
struct | InputState |
Public Member Functions | |
Button2DInputHandler (string actionMapPath, string actionPath) | |
void | OnUpdate () |
![]() | |
BaseInputHandler (string actionMapPath, string actionPath) | |
Protected Member Functions | |
override bool | TryAddListeners () |
Tries to add listeners, if they haven't been added already. | |
override bool | TryRemoveListeners () |
Tries to remove listeners, if they've been added. | |
Properties | |
Vector2 | Value [get] |
override List< BaseInputReceiver > | receivers [get] |
![]() | |
List< BaseInputReceiver > | receivers [get] |
InputAction | inputAction [get] |
Events | |
Action< Vector2 > | OnInput [add, remove] |
Private Types | |
enum | Directions { None = 0 , Up = 1 << 0 , Right = 1 << 2 , Down = 1 << 3 , Left = 1 << 4 } |
Private Member Functions | |
void | OnInputStart (InputAction.CallbackContext context) |
void | OnInputPerformed (InputAction.CallbackContext context) |
void | OnInputCancelled (InputAction.CallbackContext context) |
Private Attributes | |
InputReceiver< Vector2 > | input = new() |
List< BaseInputReceiver > | receiversBuffer |
InputState | inputState |
Static Private Attributes | |
const float | SPAM_DELAY = 0.4f |
const float | SPAM_INTERVAL = 0.2f |
A general InputHandler for 2-dimension analogue stick InputActions, that fires each possible direction as a single event.
|
private |
Slasher.Input.Button2DInputHandler.Button2DInputHandler | ( | string | actionMapPath, |
string | actionPath ) |
|
private |
|
private |
|
private |
void Slasher.Input.Button2DInputHandler.OnUpdate | ( | ) |
|
protectedvirtual |
Tries to add listeners, if they haven't been added already.
Reimplemented from Slasher.Input.BaseInputHandler.
|
protectedvirtual |
Tries to remove listeners, if they've been added.
The buffered values of receivers are wiped when listeners are removed.
Reimplemented from Slasher.Input.BaseInputHandler.
|
private |
|
private |
|
private |
|
staticprivate |
|
staticprivate |
|
getprotected |
|
get |
|
addremove |