MCPcopy Create free account
hub / github.com/EngoEngine/ecs / AddSystem

Method AddSystem

world.go:16–23  ·  view source on GitHub ↗

AddSystem adds the given System to the World, sorted by priority.

(system System)

Source from the content-addressed store, hash-verified

14
15// AddSystem adds the given System to the World, sorted by priority.
16func (w *World) AddSystem(system System) {
17 if initializer, ok := system.(Initializer); ok {
18 initializer.New(w)
19 }
20
21 w.systems = append(w.systems, system)
22 sort.Sort(w.systems)
23}
24
25// AddSystemInterface adds a system to the world, but also adds a filter that allows
26// automatic adding of entities that match the provided in interface, and excludes any

Callers 8

TestSystemPriorityFunction · 0.95
TestAddRemoveFunction · 0.95
AddSystemInterfaceMethod · 0.95
TestChangeableComponentsFunction · 0.95
TestDeleteFunction · 0.95
TestWorld_SortSystemsFunction · 0.80
BenchmarkIdiomaticFunction · 0.80
BenchmarkIdiomaticDoubleFunction · 0.80

Calls 1

NewMethod · 0.65

Tested by 7

TestSystemPriorityFunction · 0.76
TestAddRemoveFunction · 0.76
TestChangeableComponentsFunction · 0.76
TestDeleteFunction · 0.76
TestWorld_SortSystemsFunction · 0.64
BenchmarkIdiomaticFunction · 0.64
BenchmarkIdiomaticDoubleFunction · 0.64