What a stick's two axes are for.
Open, and opening the list alone would have been useless. This was an
enum of three, switched over in one method — so a game could not say its
stick leans the ship, and adding a value to say so broke every switch in
every game already shipped. Opening only the vocabulary would have left an
open list with a closed interpreter: a game could name its use and nothing
would know how to run it.
So the interpretation moved onto the value. A use is what it does with a
deflection, and a game's own use brings its own route — which is why the
three below are instances rather than cases, and why there is no switch
left to break.
base: extend it, do not implement it. A stick use that implemented this
would stop compiling the day route gains an argument, and an open type
whose additions break its users is not open for long.
Constructors
- PadStickUse()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
For logs and error messages. Not persisted: what a stick is for is a
property of the genre, written in code, and never read back from a file.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
letGo(
PadStickTarget of) → void - Returns whatever this use writes to neutral, when the pad is let go of.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
route(
PadStickTarget to, double x, double y, double dt) → void -
Applies one frame's deflection, already dead-zoned, in
-1..1. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- ignored → const PadStickUse
- Nothing. A racing game's left stick steers through PadAxisPair instead, and its right stick does not exist.
- look → const PadStickUse
- Turning the view, integrated over time — see PadRoutes.lookRate.
- move → const PadStickUse
-
Movement, through
InputState.setStickAxis.