lua.wetgenes.gamecake.zone.scene.systems
scene.systems={name=system,[1]=system}
A sorted table and lookup by caste name of each system. Table is sorted so it will be traversed backwards, backwards traversal allows the current item to delete itself.
lua.wetgenes.gamecake.zone.scene.systems.call
scene:systems_call(fname,...)
For every system call the function called fname like so.
system[fname](system,...)
Returns the number of calls made, which will be the number of systems that had an fname function to call.
If fname is a function then it will be called as if it was a method.
lua.wetgenes.gamecake.zone.scene.systems.cocall
scene:systems_cocall(fname,...)
For every system call the function called fname inside a coroutine like so.
system[fname](system,...)
This function can yield and should do so if it is waiting for another system to do something. All coroutines will be run in a round robin style until they all complete.
Returns the number of calls made, which will be the number of systems that had an fname function to call.
If fname is a function then it will be called as if it was a method.
lua.wetgenes.gamecake.zone.scene.systems.insert
scene:systems_insert(system)
Insert a new system replacing any system of the same caste. system.caste should be set to the caste of the system for this to work.
lua.wetgenes.gamecake.zone.scene.systems.remove
system = scene:systems_remove(caste)
Remove and return the system of the given caste.