addStartupSystem method
Adds system to the startup schedule. Runs once, before the first
regular update. Returns this for chaining.
Implementation
World addStartupSystem(System system) {
assert(
!_disposed,
'World.addStartupSystem: cannot be called after dispose. '
'Construct a fresh World.',
);
assert(
!_ranStartup,
'World.addStartupSystem: startup systems must be registered BEFORE the '
'first update. Adding one after `_ranStartup` means it will never run.',
);
_startupSystems.add(system);
system.init(this);
return this;
}