input

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyGamepadAbstractButtonPressed

func AnyGamepadAbstractButtonPressed(i *Input) bool

AnyGamepadAbstractButtonPressed returns the specified button was pressed or not.

Types

type Input

type Input struct {
	// contains filtered or unexported fields
}

Input manages the input state including gamepads and keyboards.

func (*Input) IsAnyGamepadButtonPressed

func (i *Input) IsAnyGamepadButtonPressed() bool

IsAnyGamepadButtonPressed returns a boolean value indicating whether any gamepad button is pressed.

func (*Input) IsRotateLeftJustPressed

func (i *Input) IsRotateLeftJustPressed() bool

IsRotateLeftJustPressed check the left rotate was pressed or not.

func (*Input) IsRotateRightJustPressed

func (i *Input) IsRotateRightJustPressed() bool

IsRotateRightJustPressed check the right rotate was pressed or not.

func (*Input) StateForDown

func (i *Input) StateForDown() int

StateForDown returns the count of the down button was pressed.

func (*Input) StateForKey

func (i *Input) StateForKey(key ebiten.Key) int

StateForKey returns time length indicating how long the key is pressed.

func (*Input) StateForLeft

func (i *Input) StateForLeft() int

StateForLeft returns the count of the left button was pressed.

func (*Input) StateForRight

func (i *Input) StateForRight() int

StateForRight returns the count of the right button was pressed.

func (*Input) Update

func (i *Input) Update()

Update updates the key state.

Jump to

Keyboard shortcuts

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