input

package
v0.0.0-...-88f0a41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

KeysetArrows for playing with the arrows

KeysetWASD for playing with WASD keys

Functions

func GetInputDir

func GetInputDir(keyset *Keyset) (models.Direction, bool)

GetInputDir checks if any key from the keyset has been pressed during the last frame and returns the player direction in that case. If no key has been pressed the second argument is bool

func HandleInputToPlayer

func HandleInputToPlayer(board *models.Player, keyset *Keyset)

HandleInputToPlayer checks if any key from the keyset has been pressed and updates the player direction

Types

type Keyset

type Keyset map[ebiten.Key](models.Direction)

Keyset is a map from input keys to output actions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL