ctrl

package
v0.2.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DelayedModeExp = iota // aka DelayedModeConverge
	DelayedModeLinear
)
View Source
const (
	None = iota - 1
	Decrease
	Increase
)

Variables

This section is empty.

Functions

func SetTPS

func SetTPS(v float64)

Types

type BoolHandler

type BoolHandler struct {
	Value *bool
}

func (BoolHandler) Decrease

func (h BoolHandler) Decrease()

func (BoolHandler) Increase

func (h BoolHandler) Increase()

type Delayed

type Delayed struct {
	Delayed   float64
	Source    float64
	Mode      int // Todo: custom type?
	Feedback  float64
	Countdown int
}

Todo: make fields unexported

func (*Delayed) Update

func (d *Delayed) Update(v float64)

func (*Delayed) Value

func (d *Delayed) Value() float64

type FloatHandler

type FloatHandler struct {
	Value    *float64
	Min, Max float64
	Unit     float64
}

func (FloatHandler) Decrease

func (h FloatHandler) Decrease()

func (FloatHandler) Increase

func (h FloatHandler) Increase()

type Handler

type Handler interface {
	Decrease()
	Increase()
}

type IntHandler

type IntHandler struct {
	Value    *int
	Min, Max int
	Loop     bool
}

func (IntHandler) Decrease

func (h IntHandler) Decrease()

func (IntHandler) Increase

func (h IntHandler) Increase()

type KeyHandler

type KeyHandler struct {
	Handler
	Modifiers []ebiten.Key // Handler works only when all Modifier are pressed.
	Keys      [2]ebiten.Key
	Sounds    [2][]byte // Todo: implement
	Volume    *float64
	// contains filtered or unexported fields
}

func (*KeyHandler) Update

func (h *KeyHandler) Update() (set bool)

Update returns whether the handler has set off (triggered) or not. Todo: set off the stricter handler only

Jump to

Keyboard shortcuts

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