Closed srcimon closed 4 months ago
Actually this was a bad idea. Doen't look pretty. But is kind of complicated to understand.
ScrewBox.createEngine("Hello World", ScrewBox.setup()
.assets(assets -> assets
.enableLogging().prepareClassPackageAsync(PathfindingApp.class))
.scenes(scenes -> scenes
.add(new DemoScene()))
.camera(camera -> camera
.setZoom(2.7))
).start();
ScrewBox.createEngine("Particles").setup()
.environment(environment -> environment
.enableTweening()
.enableParticles()
.enablePhysics()
.addEntity("particle spawner",
new TransformComponent(screwBox.graphics().world().visibleArea()),
new ParticleEmitterComponent(Duration.ofMillis(10), AREA, CONFETTI))
.addSystem(new LogFpsSystem())
.addEntity("particle interactor",
new CursorAttachmentComponent(),
new PhysicsComponent(),
new TransformComponent(-60, -60, 120, 120),
new ParticleInteractionComponent(80))
.enableRendering())
.quitSetupAndStart();
ScrewBox.setup()
.assets(assets -> assets
.enableLogging())
.environment(environment -> environment
.environment()
.enableTweening()
.enableParticles())
.start() // or. createEngine()
ScrewBox.createEngine();
ScrewBox.createEngine("Particles", setup -> setup
.assets(assets -> assets.enableLogging())
.assets(assets -> assets.enableLogging())
).start();
Engine screwBox = ScrewBox.createEngine("Particles",
engine -> engine.environment()
.enableTweening()
.enableParticles()
.enablePhysics(),
engine -> engine.environment()
.enableTweening()
.enableParticles()
.enablePhysics());
ScrewBox.createEngine("Particles",
Customizer.assets(assets -> assets
.enableLogging()
.prepareEngineAssets()),
Customizer.environment(environment -> environment
.enableTweening()
.enableParticles()
.enablePhysics()))
.start();
finally removing this idea from my brain.
ScrewBox.createEngine("Vacuum Outlaws") .scenes(scenes -> scenes.add(new GameScene())) .start(GameScene.class);