statemachine

package
v0.0.0-...-aac1211 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AUDIO_DONE = iota
	AUDIO_UNDONE
)
View Source
const (
	INPUT_EMPTY = iota
	INPUT_SETTINGS_MENU_USERNAME
	INPUT_JOIN_MENU
	INPUT_GAME
)
View Source
const (
	NETWORKING_OFFLINE = iota
	NETWORKING_ONLINE
	NETWORKING_WAIT_CONNECTION
)
View Source
const (
	DIAL_LAN = iota
	DIAL_WAN
)
View Source
const (
	GAME_START = iota
	GAME_JOIN
)
View Source
const (
	UI_START_MENU = iota
	UI_SETTINGS_MENU

	UI_JOIN_MENU

	UI_MAP_CHOOSE
	UI_HERO_CHOOSE

	UI_WAIT_ROOM_START
	UI_WAIT_ROOM_JOIN

	UI_CHOOSE_EQUIPMENT

	UI_GAME
)
View Source
const (
	UI_SETTINGS_MENU_CHECKBOX_ON = iota
	UI_SETTINGS_MENU_CHECKBOX_OFF
)
View Source
const (
	PC_ALIVE = iota
	PC_DEAD_LONG
	PC_DEAD_NOW
	PC_IN_FIGHT
)
View Source
const (
	MOUSE_BUTTON_CLICK = iota
	MOUSE_CLICK
	MOUSE_NONE
)
View Source
const (
	NOTIFICATION_NEW = iota
	NOTIFICATION_NONE
)
View Source
const (
	MINIMAP_ON = iota
	MINIMAP_OFF
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IMultipleState

type IMultipleState interface {
	SetState(uuid.UUID, int)
	GetState(uuid.UUID) int
	Reset()
}

func NewMultipleState

func NewMultipleState(defaultState int) IMultipleState

type ISingleState

type ISingleState interface {
	SetState(int)
	GetState() int
}

func NewSingleState

func NewSingleState(defaultState int) ISingleState

type IStateMachine

type IStateMachine interface {
	Audio() ISingleState
	Game() ISingleState
	UI() ISingleState
	Input() ISingleState
	Networking() ISingleState
	Dial() ISingleState
	SettingsMenuCheckbox() ISingleState
	PCs() IMultipleState
	Mouse() ISingleState
	Notification() ISingleState
	Minimap() ISingleState
}

func UseStateMachine

func UseStateMachine() IStateMachine

type MultipleState

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

func (*MultipleState) GetState

func (s *MultipleState) GetState(i uuid.UUID) int

func (*MultipleState) Reset

func (s *MultipleState) Reset()

func (*MultipleState) SetState

func (s *MultipleState) SetState(i uuid.UUID, st int)

type SingleState

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

func (*SingleState) GetState

func (s *SingleState) GetState() int

func (*SingleState) SetState

func (s *SingleState) SetState(st int)

type StateMachine

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

func (*StateMachine) Audio

func (s *StateMachine) Audio() ISingleState

func (*StateMachine) Dial

func (s *StateMachine) Dial() ISingleState

func (*StateMachine) Game

func (s *StateMachine) Game() ISingleState

func (*StateMachine) Input

func (s *StateMachine) Input() ISingleState

func (*StateMachine) Minimap

func (s *StateMachine) Minimap() ISingleState

func (*StateMachine) Mouse

func (s *StateMachine) Mouse() ISingleState

func (*StateMachine) Networking

func (s *StateMachine) Networking() ISingleState

func (*StateMachine) Notification

func (s *StateMachine) Notification() ISingleState

func (*StateMachine) PCs

func (s *StateMachine) PCs() IMultipleState

func (*StateMachine) SettingsMenuCheckbox

func (s *StateMachine) SettingsMenuCheckbox() ISingleState

func (*StateMachine) UI

func (s *StateMachine) UI() ISingleState

Jump to

Keyboard shortcuts

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