Search in sources :

Example 1 with BaseSystem

use of com.artemis.BaseSystem in project nhglib by VoidZombie.

the class EngineStateClosing method enter.

@Override
public void enter(NhgEntry nhgEntry) {
    Logger.log(this, "Engine is closing.");
    nhgEntry.engineClosing();
    ImmutableBag<BaseSystem> systems = nhgEntry.nhg.entities.getEntitySystems();
    for (BaseSystem bs : systems) {
        if (bs instanceof Disposable) {
            ((Disposable) bs).dispose();
        }
    }
    nhgEntry.nhg.assets.dispose();
    nhgEntry.nhg.threading.terminate();
    Gdx.app.exit();
}
Also used : Disposable(com.badlogic.gdx.utils.Disposable) BaseSystem(com.artemis.BaseSystem)

Aggregations

BaseSystem (com.artemis.BaseSystem)1 Disposable (com.badlogic.gdx.utils.Disposable)1