andygeiss/ecs

View on GitHub
system_manager_default.go

Summary

Maintainability
A
0 mins
Test Coverage
package ecs

// defaultSystemManager
type defaultSystemManager struct {
    systems []System
}

// Add systems to the defaultSystemManager.
func (m *defaultSystemManager) Add(systems ...System) {
    m.systems = append(m.systems, systems...)
}

// Systems returns the system, which are internally stored.
func (m *defaultSystemManager) Systems() []System {
    return m.systems
}

// NewSystemManager creates a new defaultSystemManager and returns its address.
func NewSystemManager() SystemManager {
    return &defaultSystemManager{
        systems: []System{},
    }
}