Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KeysetArrows = Keyset{ ebiten.KeyUp: models.Up, ebiten.KeyDown: models.Down, ebiten.KeyLeft: models.Left, ebiten.KeyRight: models.Right}
KeysetArrows for playing with the arrows
View Source
var KeysetWASD = Keyset{ ebiten.KeyW: models.Up, ebiten.KeyS: models.Down, ebiten.KeyA: models.Left, ebiten.KeyD: models.Right}
KeysetWASD for playing with WASD keys
Functions ¶
func GetInputDir ¶
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 ¶
HandleInputToPlayer checks if any key from the keyset has been pressed and updates the player direction
Types ¶
Click to show internal directories.
Click to hide internal directories.