mirror of
https://github.com/bakpakin/tiny-ecs.git
synced 2024-11-17 04:44:23 +00:00
Add method for activating and deactivating Systems in Worlds.
This commit is contained in:
parent
05d7574794
commit
231182e7c2
9
jojo.lua
9
jojo.lua
@ -442,4 +442,13 @@ function World:clearSystems()
|
||||
self.systemsToRemove = newSystemsToRemove
|
||||
end
|
||||
|
||||
-- World:setSystemActive(system, active)
|
||||
|
||||
-- Sets if a System is active in a world. If the system is active, it will
|
||||
-- update automatically when World:update(dt) is called. Otherwise, the user
|
||||
-- must call World:updateSystem(system, dt) to update the unactivated system.
|
||||
function World:setSystemActive(system, active)
|
||||
self.activeSystem[system] = active and true or nil
|
||||
end
|
||||
|
||||
return jojo
|
||||
|
Loading…
Reference in New Issue
Block a user