worldstage

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: LGPL-3.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager() *Manager

func (*Manager) CompareAndSwap

func (m *Manager) CompareAndSwap(oldStage, newStage Stage) (swapped bool)

func (*Manager) Current

func (m *Manager) Current() Stage

func (*Manager) Store

func (m *Manager) Store(val Stage)

func (*Manager) Swap

func (m *Manager) Swap(newStage Stage) (oldStage Stage)

type Stage

type Stage string
const (
	Init         Stage = "Init"         // The default stage of world
	Starting     Stage = "Starting"     // World is moved to this stage after StartGame() is called
	Recovering   Stage = "Recovering"   // World is moved to this stage when RecoverFromChain() is called
	Ready        Stage = "Ready"        // World is moved to this stage when it's ready to start ticking
	Running      Stage = "Running"      // World is moved to this stage when Tick() is first called
	ShuttingDown Stage = "ShuttingDown" // World is moved to this stage when it received a shutdown signal
	ShutDown     Stage = "ShutDown"     // World is moved to this stage when it has successfully shutdown
)

Jump to

Keyboard shortcuts

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