Handbook
Glossary
wasd-keyboard-input ( world -- )
Vocabulary
gpu
.
util
.
wasd
Inputs
world
an
object
Outputs
None
Definition
USING:
accessors
game.input
game.input.scancodes
kernel
sequences
ui
;
IN:
gpu.util.wasd
::
wasd-keyboard-input
( world -- )
read-keyboard
keys>>
:>
keys
key-w
keys
nth
[
world
walk-forward
]
when
key-s
keys
nth
[
world
walk-backward
]
when
key-a
keys
nth
[
world
walk-leftward
]
when
key-d
keys
nth
[
world
walk-rightward
]
when
key-space
keys
nth
[
world
walk-upward
]
when
key-c
keys
nth
[
world
walk-downward
]
when
key-escape
keys
nth
[
world
close-window
]
when
;