diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-02 21:00:54 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-02 21:00:54 +0100 |
commit | 0a1739de21e5ab270cb45efb6fc0aed092d81227 (patch) | |
tree | ab4019d595fce2410c5ca5d0fd98ad6d8205c079 /src/example/rendering_particle.cpp | |
parent | a84ca09e97d466643f022acfffcf4c6a77f42052 (diff) |
added all the contructor strutcts for animator,sprite and camera
Diffstat (limited to 'src/example/rendering_particle.cpp')
-rw-r--r-- | src/example/rendering_particle.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/example/rendering_particle.cpp b/src/example/rendering_particle.cpp index 4fd4071..f84eb94 100644 --- a/src/example/rendering_particle.cpp +++ b/src/example/rendering_particle.cpp @@ -70,11 +70,19 @@ public: .spritesheet = test_sprite, .col = 4, .row = 4, - .fps = 10, + .fps = 1, + .looping = true, + .cycle_start = 1, + .cycle_end = 3, }); + anim.set_anim(2); - auto & cam = game_object.add_component<Camera>(Color::WHITE, ivec2{720, 1280}, - vec2{400, 400}, 1.0); + auto & cam = game_object.add_component<Camera>(Camera::Data{ + .bg_color = Color::WHITE, + .screen = ivec2{720, 1280}, + .viewport_size = vec2{400, 400}, + .zoom = 1.0, + }); } string get_name() const { return "TestScene"; }; |