@Override protected void setWorld(World world) { super.setWorld(world); }
/** * Process system. * * Does nothing if {@link #checkProcessing()} is false or the system * is disabled. * * @see InvocationStrategy */ public final void process() { if(checkProcessing()) { begin(); processSystem(); end(); } }
/** * Disposes all systems. Only necessary if either need to free * managed resources upon bringing the world to an end. * @throws ArtemisMultiException * if any system throws an exception. */ public void dispose() { List<Throwable> exceptions = new ArrayList<Throwable>(); for (BaseSystem system : systemsBag) { try { system.dispose(); } catch (Exception e) { exceptions.add(e); } } if (exceptions.size() > 0) throw new ArtemisMultiException(exceptions); }
private void processProfileSystem(SystemProfiler profiler, BaseSystem system) { if (profiler != null) profiler.start(); system.process(); if (profiler != null) profiler.stop(); }
private void initializeSystems(Injector injector) { for (int i = 0, s = systems.size(); i < s; i++) { BaseSystem system = systems.get(i); injector.inject(system); } for (int i = 0, s = systems.size(); i < s; i++) { BaseSystem system = systems.get(i); system.initialize(); } }
system.setEnabled(true); system.setEnabled(false);
private void processProfileSystem(SystemProfiler profiler, BaseSystem system) { if (profiler != null) profiler.start(); system.process(); if (profiler != null) profiler.stop(); }
private void initializeSystems(Injector injector) { for (int i = 0, s = systems.size(); i < s; i++) { BaseSystem system = systems.get(i); injector.inject(system); } for (int i = 0, s = systems.size(); i < s; i++) { BaseSystem system = systems.get(i); system.initialize(); } }
@Override protected void setWorld(World world) { super.setWorld(world); }
/** * Processes all systems in order. * <p> * Should guarantee artemis is in a sane state using calls to #updateEntityStates * before each call to a system, and after the last system has been called, or if no * systems have been called at all. */ @Override protected void process() { BaseSystem[] systemsData = systems.getData(); for (int i = 0, s = systems.size(); s > i; i++) { if (disabled.get(i)) continue; updateEntityStates(); systemsData[i].process(); } updateEntityStates(); } }
/** * Process system. * * Does nothing if {@link #checkProcessing()} is false or the system * is disabled. * * @see InvocationStrategy */ public final void process() { if(checkProcessing()) { begin(); processSystem(); end(); } }
/** * Disposes all systems. Only necessary if either need to free * managed resources upon bringing the world to an end. * @throws ArtemisMultiException * if any system throws an exception. */ public void dispose() { List<Throwable> exceptions = new ArrayList<Throwable>(); for (BaseSystem system : systemsBag) { try { system.dispose(); } catch (Exception e) { exceptions.add(e); } } if (exceptions.size() > 0) throw new ArtemisMultiException(exceptions); }
@Override protected void setWorld(World world) { super.setWorld(world); // making sure the first subscription matches all entities get(all()); }
/** * Processes all systems in order. * * Should guarantee artemis is in a sane state using calls to #updateEntityStates * before each call to a system, and after the last system has been called, or if no * systems have been called at all. */ @Override protected void process() { Object[] systemsData = systems.getData(); for (int i = 0, s = systems.size(); s > i; i++) { if (disabled.get(i)) continue; updateEntityStates(); ((BaseSystem)systemsData[i]).process(); } updateEntityStates(); } }
@Override protected void setWorld(World world) { super.setWorld(world); // making sure the first subscription matches all entities get(all()); }
/** * Processes all systems in order. * <p> * Should guarantee artemis is in a sane state using calls to #updateEntityStates * before each call to a system, and after the last system has been called, or if no * systems have been called at all. */ @Override protected void process() { BaseSystem[] systemsData = systems.getData(); for (int i = 0, s = systems.size(); s > i; i++) { if (disabled.get(i)) continue; updateEntityStates(); systemsData[i].process(); } updateEntityStates(); } }
/** * Set the world this system works on. * * @param world * the world to set */ @Override protected void setWorld(World world) { super.setWorld(world); if(implementsObserver(this, "added")) methodFlags |= FLAG_INSERTED; if(implementsObserver(this, "deleted")) methodFlags |= FLAG_REMOVED; }
/** * Set the world this system works on. * * @param world * the world to set */ @Override protected void setWorld(World world) { super.setWorld(world); if(implementsObserver(this, "added")) methodFlags |= FLAG_INSERTED; if(implementsObserver(this, "deleted")) methodFlags |= FLAG_REMOVED; }
protected void setWorld(World world) { super.setWorld(world); subscription = getSubscription(); if (implementsAnyObserver(this)) subscription.addSubscriptionListener(this); }
protected void setWorld(World world) { super.setWorld(world); subscription = getSubscription(); if (implementsAnyObserver(this)) subscription.addSubscriptionListener(this); }