Changed SystemBitManager usage from static to instanced:
solves a multithreading issue when several EntityWorlds are
concurrently initialized;
solves an issue when every next EntityWorld created gets its System's
SystemBit starting not from 0, but from the last bit of the System of
the previous world (i. e. SystemBit value gradually increases between
worlds).
I did not thoroughly reviewed implementation dependencies of using an instance of EntitySystem instead of it's Type as a key: though ComponentType system works with Types, not instances.
Also the whole SystemBitManager class can probably be merged into SystemManager for simplicity.
Changed SystemBitManager usage from static to instanced:
I did not thoroughly reviewed implementation dependencies of using an instance of EntitySystem instead of it's Type as a key: though ComponentType system works with Types, not instances.
Also the whole SystemBitManager class can probably be merged into SystemManager for simplicity.