use of org.terasology.engine.entitySystem.systems.ComponentSystem in project Terasology by MovingBlocks.
the class ComponentSystemManager method initialise.
public void initialise() {
if (!initialised) {
console = context.get(Console.class);
for (ComponentSystem system : getAllSystems()) {
initialiseSystem(system);
}
initialised = true;
} else {
logger.error("ComponentSystemManager got initialized twice");
}
}
use of org.terasology.engine.entitySystem.systems.ComponentSystem in project Terasology by MovingBlocks.
the class PostBeginSystems method begin.
@Override
public void begin() {
ComponentSystemManager manager = context.get(ComponentSystemManager.class);
final List<ComponentSystem> componentSystemList = manager.getAllSystems();
componentSystems = componentSystemList.iterator();
setTotalSteps(componentSystemList.size());
}
use of org.terasology.engine.entitySystem.systems.ComponentSystem in project Terasology by MovingBlocks.
the class ReadWriteStorageManager method startAutoSaving.
private void startAutoSaving() {
logger.info("Auto Saving - Creating game snapshot");
PerformanceMonitor.startActivity("Auto Saving");
ComponentSystemManager componentSystemManager = CoreRegistry.get(ComponentSystemManager.class);
for (ComponentSystem sys : componentSystemManager.getAllSystems()) {
sys.preAutoSave();
}
saveTransaction = createSaveTransaction();
saveThreadManager.offer(saveTransaction);
for (ComponentSystem sys : componentSystemManager.getAllSystems()) {
sys.postAutoSave();
}
scheduleNextAutoSave();
PerformanceMonitor.endActivity();
entitySetDeltaRecorder = new EntitySetDeltaRecorder(this.entityRefReplacingComponentLibrary);
logger.info("Auto Saving - Snapshot created: Writing phase starts");
}
Aggregations