Controls

class Controls(val keys: Set<Key> = emptySet(), val pointer: FlatPoint? = null, val pointerDown: Boolean = false)

One step's commanded input, stated as level state only: which keys are held, and where the pointer is.

There are no edge flags to manage — drive derives press and release edges by comparing each step's controls against the previous step's, so a script states only what is held and the latching contract falls out correctly by construction.

Constructors

Link copied to clipboard
constructor(keys: Set<Key> = emptySet(), pointer: FlatPoint? = null, pointerDown: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val keys: Set<Key>

The keys held down during the step.

Link copied to clipboard

Where the pointer is, as a FlatPoint in CGA model units, or null when there is no pointer.

Link copied to clipboard

Whether the pointer is pressed — meaningful only while pointer is non-null.