system

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: LGPL-3.0 Imports: 9 Imported by: 0

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

NewManager creates a new system manager.

func (*Manager) GetCurrentSystem

func (m *Manager) GetCurrentSystem() string

func (*Manager) GetRegisteredSystemNames

func (m *Manager) GetRegisteredSystemNames() []string

func (*Manager) RegisterInitSystems

func (m *Manager) RegisterInitSystems(systems ...System) error

RegisterInitSystems registers multiple init systems that is only executed once at tick 0 with the system manager. There can only be one system with a given name, which is derived from the function name. If there is a duplicate system name, an error will be returned and none of the systems will be registered.

func (*Manager) RegisterSystems

func (m *Manager) RegisterSystems(systems ...System) error

RegisterSystems registers multiple systems with the system manager. There can only be one system with a given name, which is derived from the function name. If there is a duplicate system name, an error will be returned and none of the systems will be registered.

func (*Manager) RunSystems

func (m *Manager) RunSystems(wCtx engine.Context) error

RunSystems runs all the registered system in the order that they were registered.

type System

type System func(ctx engine.Context) error

Jump to

Keyboard shortcuts

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