Documentation ¶
Index ¶
- type BaseModule
- type Manager
- func (m *Manager) Add(mod Module) Module
- func (m *Manager) Find(t reflect.Type) Module
- func (m *Manager) FindAll(t reflect.Type) []Module
- func (m *Manager) Get(i int) Module
- func (m *Manager) Init() error
- func (m *Manager) Len() int
- func (m *Manager) Shutdown()
- func (m *Manager) Start()
- func (m *Manager) Update(now time.Time, dt time.Duration)
- type Module
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModule ¶
type BaseModule struct {
// contains filtered or unexported fields
}
BaseModule implements the Module interface{}
func (*BaseModule) Logger ¶
func (mod *BaseModule) Logger() *log.ContextLogger
Logger returns the Module logger
func (*BaseModule) Shutdown ¶
func (mod *BaseModule) Shutdown()
Shutdown implements Module Shutdown method
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager used to manages a group of modules
type Module ¶
type Module interface { // Name returns the name of module Name() string // Init initializes the module Init() error // Start starts the module Start() // Shutdown shutdwons the module Shutdown() // Update updates the module per frame Update(time.Time, time.Duration) }
Module represents a generic logic module
Click to show internal directories.
Click to hide internal directories.