diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-08 19:49:41 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-08 19:49:41 +0100 |
commit | 519cc5d16e65ff501d330c03eeb35d2d095ead29 (patch) | |
tree | 3c7c3a64c922ec248f4136d1282530a6ec6647ac /src/example | |
parent | 63bcd54e0e0ea64cfef5950568b4253d5dae5c1e (diff) |
made sdlcontext not a singleton anymore
Diffstat (limited to 'src/example')
-rw-r--r-- | src/example/rendering_particle.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/example/rendering_particle.cpp b/src/example/rendering_particle.cpp index 13ea591..87a6eb9 100644 --- a/src/example/rendering_particle.cpp +++ b/src/example/rendering_particle.cpp @@ -52,19 +52,22 @@ public: Color color(255, 255, 255, 255); - Asset img{"asset/texture/img.png"}; + Asset img{"asset/texture/test_ap43.png"}; + + Sprite & test_sprite + = game_object.add_component<Sprite>(img, ivec2{259, 195}, + Sprite::Data{ + .color = color, + .flip = Sprite::FlipSettings{false, false}, + .sorting_in_layer = 2, + .order_in_layer = 2, + .size = {0, 100}, + .angle_offset = 0, + .position_offset = {0, 0}, + }); + + /* - Sprite & test_sprite = game_object.add_component<Sprite>( - img, Sprite::Data{ - .color = color, - .flip = Sprite::FlipSettings{false, false}, - .sorting_in_layer = 2, - .order_in_layer = 2, - .size = {0, 100}, - .angle_offset = 0, - .position_offset = {100, 0}, - }); - auto & anim = game_object.add_component<Animator>(test_sprite, 4, 4, Animator::Data{ .fps = 1, @@ -72,6 +75,7 @@ public: }); anim.set_anim(2); anim.active = false; + */ auto & cam = game_object.add_component<Camera>(ivec2{1280, 720}, vec2{400, 400}, Camera::Data{ |