Style Slasher
A dressup combat roguelike created by Scrungle Studios for the 2025 Swinburne Capstone project.
Slasher.Input.Analogue2DInputHandler Class Referenceabstract

A general InputHandler for 2-dimension analogue stick InputActions. More...

Inheritance diagram for Slasher.Input.Analogue2DInputHandler:
Inheritance graph
Collaboration diagram for Slasher.Input.Analogue2DInputHandler:
Collaboration graph

Public Member Functions

 Analogue2DInputHandler (string actionMapPath, string actionPath)
 
- Public Member Functions inherited from Slasher.Input.BaseInputHandler
 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< BaseInputReceiverreceivers [get]
 
- Properties inherited from Slasher.Input.BaseInputHandler
List< BaseInputReceiverreceivers [get]
 
InputAction inputAction [get]
 

Events

Action< bool > OnInputStateChange [add, remove]
 
Action< Vector2 > OnInputValue [add, remove]
 

Private Member Functions

void OnInputStart (InputAction.CallbackContext context)
 
void OnInputPerformed (InputAction.CallbackContext context)
 
void OnInputCancelled (InputAction.CallbackContext context)
 

Private Attributes

InputReceiver< bool > inputState = new()
 
InputReceiver< Vector2 > inputValue = new()
 
List< BaseInputReceiverreceiversBuffer
 

Detailed Description

A general InputHandler for 2-dimension analogue stick InputActions.

Constructor & Destructor Documentation

◆ Analogue2DInputHandler()

Slasher.Input.Analogue2DInputHandler.Analogue2DInputHandler ( string actionMapPath,
string actionPath )

Member Function Documentation

◆ OnInputCancelled()

void Slasher.Input.Analogue2DInputHandler.OnInputCancelled ( InputAction.CallbackContext context)
private

◆ OnInputPerformed()

void Slasher.Input.Analogue2DInputHandler.OnInputPerformed ( InputAction.CallbackContext context)
private

◆ OnInputStart()

void Slasher.Input.Analogue2DInputHandler.OnInputStart ( InputAction.CallbackContext context)
private

◆ TryAddListeners()

override bool Slasher.Input.Analogue2DInputHandler.TryAddListeners ( )
protectedvirtual

Tries to add listeners, if they haven't been added already.

Returns
If listeners were added. Listeners will not be added if they have already been added.

Reimplemented from Slasher.Input.BaseInputHandler.

Here is the call graph for this function:

◆ TryRemoveListeners()

override bool Slasher.Input.Analogue2DInputHandler.TryRemoveListeners ( )
protectedvirtual

Tries to remove listeners, if they've been added.

The buffered values of receivers are wiped when listeners are removed.

Returns
If listeners were removed. Listeners may not be removed if they haven't been added, or if any receivers still have any listeners for their Actions.

Reimplemented from Slasher.Input.BaseInputHandler.

Here is the call graph for this function:

Member Data Documentation

◆ inputState

InputReceiver<bool> Slasher.Input.Analogue2DInputHandler.inputState = new()
private

◆ inputValue

InputReceiver<Vector2> Slasher.Input.Analogue2DInputHandler.inputValue = new()
private

◆ receiversBuffer

List<BaseInputReceiver> Slasher.Input.Analogue2DInputHandler.receiversBuffer
private

Property Documentation

◆ receivers

override List<BaseInputReceiver> Slasher.Input.Analogue2DInputHandler.receivers
getprotected

◆ Value

Vector2 Slasher.Input.Analogue2DInputHandler.Value
get

Event Documentation

◆ OnInputStateChange

Action<bool> Slasher.Input.Analogue2DInputHandler.OnInputStateChange
addremove

◆ OnInputValue

Action<Vector2> Slasher.Input.Analogue2DInputHandler.OnInputValue
addremove

The documentation for this class was generated from the following file: