state

package
v0.0.0-...-2482a4e Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Done

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

func MakeDone

func MakeDone(state State) Done

func (Done) Destroy

func (done Done) Destroy()

func (Done) OnKeyboardEvent

func (done Done) OnKeyboardEvent(event *sdl.KeyboardEvent) State

func (Done) OnMouseButtonEvent

func (done Done) OnMouseButtonEvent(event *sdl.MouseButtonEvent) State

func (Done) OnMouseMotionEvent

func (done Done) OnMouseMotionEvent(event *sdl.MouseMotionEvent) State

func (Done) OnQuit

func (done Done) OnQuit(event *sdl.QuitEvent) State

func (Done) OnTick

func (done Done) OnTick() State

func (Done) OnTickDelay

func (done Done) OnTickDelay() State

func (Done) PostEvent

func (done Done) PostEvent() State

func (Done) PreEvent

func (done Done) PreEvent() State

func (Done) TickDelayed

func (done Done) TickDelayed() bool

type Quit

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

func MakeQuit

func MakeQuit(state State) Quit

func (Quit) Destroy

func (quit Quit) Destroy()

func (Quit) OnKeyboardEvent

func (quit Quit) OnKeyboardEvent(event *sdl.KeyboardEvent) State

func (Quit) OnMouseButtonEvent

func (quit Quit) OnMouseButtonEvent(event *sdl.MouseButtonEvent) State

func (Quit) OnMouseMotionEvent

func (quit Quit) OnMouseMotionEvent(event *sdl.MouseMotionEvent) State

func (Quit) OnQuit

func (quit Quit) OnQuit(event *sdl.QuitEvent) State

func (Quit) OnTick

func (quit Quit) OnTick() State

func (Quit) OnTickDelay

func (quit Quit) OnTickDelay() State

func (Quit) PostEvent

func (quit Quit) PostEvent() State

func (Quit) PreEvent

func (quit Quit) PreEvent() State

func (Quit) TickDelayed

func (quit Quit) TickDelayed() bool

type State

type State interface {
	Destroy()
	PreEvent() State
	OnTick() State
	TickDelayed() bool
	OnTickDelay() State
	OnQuit(event *sdl.QuitEvent) State
	OnKeyboardEvent(event *sdl.KeyboardEvent) State
	OnMouseMotionEvent(event *sdl.MouseMotionEvent) State
	OnMouseButtonEvent(event *sdl.MouseButtonEvent) State
	PostEvent() State
}

func Transition

func Transition(old State, new State) State

Jump to

Keyboard shortcuts

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