component

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bind

type Bind struct {
	Action suslik.Action
	Keys   []suslik.Key
}

type BindAxis

type BindAxis struct {
	Value float32
	Key   suslik.Key
}

type Input

type Input struct {
	suslik.Game

	Actions map[string]Bind
	Axes    map[string][]BindAxis
	// contains filtered or unexported fields
}

func NewInput added in v0.2.0

func NewInput() *Input

func (*Input) Action

func (input *Input) Action(name string) bool

func (*Input) Axis

func (input *Input) Axis(name string) float32

func (*Input) Key

func (input *Input) Key(key suslik.Key, modifier suslik.Modifier, action suslik.Action)

func (*Input) MapAction

func (input *Input) MapAction(name string, bind Bind)

func (*Input) MapAxis

func (input *Input) MapAxis(name string, binds ...BindAxis)

func (*Input) Mouse

func (input *Input) Mouse(x, y float32, button suslik.Key, action suslik.Action)

func (*Input) MouseState

func (input *Input) MouseState(name string) (x, y float32, button suslik.Key, action suslik.Action)

func (*Input) Scroll

func (input *Input) Scroll(amount float32)

func (*Input) Update

func (input *Input) Update(dt float32)

Jump to

Keyboard shortcuts

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