Skip to main content

SwipeInputSource

A class in Root.Township, the global namespace.

Input source that fires a single press and release when the controller's d-pad reports a swipe in its direction.

Constructors​

MemberWhat it is
SwipeInputSource(int direction, PlayerInput controller)Creates a SwipeInputSource from direction and controller.

Fields​

1 private and internal field
MemberWhat it is
private PlayerInput playerInputThe hand input whose d-pad is watched.

Properties​

MemberWhat it is
int Direction { get; }The swipe direction this source reacts to.

Methods​

MemberWhat it is
void AddListeners()Subscribes to the d-pad's swipe event.
void RemoveListeners()Unsubscribes from the d-pad's swipe event.
1 private and internal method
MemberWhat it is
private void KeyPressed(int direction)On a swipe in this direction, presses and immediately releases.