controller

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToggleTrace = ebiten.KeyTab
	ToggleDebug = ebiten.KeyGraveAccent
	StepFrame   = ebiten.Key1
	RunToRender = ebiten.Key2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Enabled bool

	Keymap Keymap
	// contains filtered or unexported fields
}

func NewController

func NewController(conf *config.Config, player Player) Controller

func (*Controller) Read

func (j *Controller) Read() byte

func (*Controller) UpdateInput

func (j *Controller) UpdateInput()

func (*Controller) Write

func (j *Controller) Write(data byte)

type Keymap

type Keymap struct {
	Regular map[button.Button]ebiten.Key
	Turbo   map[button.Button]ebiten.Key
}

func NewKeymap

func NewKeymap(conf *config.Config, player Player) Keymap

type Player

type Player string
const (
	Player1 Player = "player1"
	Player2 Player = "player2"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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