use of io.github.voidzombie.nhglib.runtime.ecs.systems.impl.PhysicsSystem in project nhglib by VoidZombie.
the class EngineStateNotInitialized method enter.
@Override
public void enter(NhgEntry nhgEntry) {
Logger.log(this, "Engine is not initialized.");
// Setup the ECS world.
WorldConfigurationBuilder configurationBuilder = new WorldConfigurationBuilder();
// Configure user entity systems
nhgEntry.onConfigureEntitySystems(configurationBuilder);
// Configure the most important systems last, especially GraphicsSystem which
// should be the last because it renders all the changes happened in all other
// systems.
configurationBuilder.with(new PhysicsSystem()).with(new CameraSystem()).with(new LightingSystem(nhgEntry.nhg.threading)).with(new GraphicsSystem(nhgEntry.nhg.entities, nhgEntry.nhg.messaging));
nhgEntry.nhg.entities.setEntityWorld(new World(configurationBuilder.build()));
nhgEntry.engineStarted();
nhgEntry.getFsm().changeState(EngineStates.INITIALIZED);
}
Aggregations