MCPcopy Create free account
hub / github.com/alecthomas/entityx / Application

Class Application

examples/example.cc:369–393  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367
368
369class Application : public ex::EntityX {
370public:
371 explicit Application(sf::RenderTarget &target, sf::Font &font) {
372 systems.add<SpawnSystem>(target, 500);
373 systems.add<BodySystem>();
374 systems.add<BounceSystem>(target);
375 systems.add<CollisionSystem>(target);
376 systems.add<ExplosionSystem>();
377 systems.add<ParticleSystem>();
378 systems.add<RenderSystem>(target, font);
379 systems.add<ParticleRenderSystem>(target);
380 systems.configure();
381 }
382
383 void update(ex::TimeDelta dt) {
384 systems.update<SpawnSystem>(dt);
385 systems.update<BodySystem>(dt);
386 systems.update<BounceSystem>(dt);
387 systems.update<CollisionSystem>(dt);
388 systems.update<ExplosionSystem>(dt);
389 systems.update<ParticleSystem>(dt);
390 systems.update<RenderSystem>(dt);
391 systems.update<ParticleRenderSystem>(dt);
392 }
393};
394
395
396

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected