diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2024-12-13 20:44:32 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2024-12-13 20:44:32 +0100 |
commit | 512aa7f54b88994d3095971b2001930b4e612947 (patch) | |
tree | 443188c36fcb380b335504ac01b7730bca70266b /src/example | |
parent | 79741613fdf915bfb8b7517826205d2cb1715971 (diff) |
make format
Diffstat (limited to 'src/example')
-rw-r--r-- | src/example/game.cpp | 31 | ||||
-rw-r--r-- | src/example/rendering_particle.cpp | 1 |
2 files changed, 15 insertions, 17 deletions
diff --git a/src/example/game.cpp b/src/example/game.cpp index 279648e..2d25153 100644 --- a/src/example/game.cpp +++ b/src/example/game.cpp @@ -261,24 +261,23 @@ public: = false; Asset img5{"asset/texture/square.png"}; - - GameObject particle = mgr.new_object( "Name", "Tag", vec2{screen_size_width / 2, screen_size_height / 2}, 0, 1); - auto & particle_image = particle.add_component<Sprite>(img5, Sprite::Data{.size = {5, 5},}); - auto & test = particle.add_component<ParticleEmitter>(particle_image,ParticleEmitter::Data{ - .position = {0, 0}, - .max_particles = 256, - .emission_rate = 50, - .min_speed = 10, - .max_speed = 20, - .min_angle = -20, - .max_angle = 20, - .begin_lifespan = 0, - .end_lifespan = 5, - } - ); - + auto & particle_image = particle.add_component<Sprite>(img5, Sprite::Data{ + .size = {5, 5}, + }); + auto & test + = particle.add_component<ParticleEmitter>(particle_image, ParticleEmitter::Data{ + .position = {0, 0}, + .max_particles = 256, + .emission_rate = 50, + .min_speed = 10, + .max_speed = 20, + .min_angle = -20, + .max_angle = 20, + .begin_lifespan = 0, + .end_lifespan = 5, + }); } string get_name() const { return "scene1"; } diff --git a/src/example/rendering_particle.cpp b/src/example/rendering_particle.cpp index 2b5c041..add43f4 100644 --- a/src/example/rendering_particle.cpp +++ b/src/example/rendering_particle.cpp @@ -17,7 +17,6 @@ using namespace crepe; using namespace std; - class TestScene : public Scene { public: |