From 9b4fecb5e3996a418502a696b79be92d226f23b1 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Thu, 21 Nov 2024 20:23:19 +0100 Subject: rendering particles in at the center point and not in the top left corner. --- src/example/rendering_particle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/example') diff --git a/src/example/rendering_particle.cpp b/src/example/rendering_particle.cpp index 4571afb..dd85689 100644 --- a/src/example/rendering_particle.cpp +++ b/src/example/rendering_particle.cpp @@ -23,14 +23,14 @@ using namespace std; int main(int argc, char * argv[]) { ComponentManager mgr; - GameObject game_object = mgr.new_object("", "", Vector2{100, 100}, 0, 0.1); + GameObject game_object = mgr.new_object("", "", Vector2{0, 0}, 0, 0.1); RenderSystem sys{mgr}; ParticleSystem psys{mgr}; Color color(255, 255, 255, 255); Sprite & test_sprite = game_object.add_component( - make_shared("../asset/texture/img.png"), color, FlipSettings{false, false}); + make_shared("asset/texture/img.png"), color, FlipSettings{false, false}); test_sprite.order_in_layer = 5; auto & test = game_object.add_component(ParticleEmitter::Data{ @@ -55,7 +55,7 @@ int main(int argc, char * argv[]) { game_object.add_component(Color::WHITE); game_object - .add_component(make_shared("../asset/texture/img.png"), color, + .add_component(make_shared("asset/texture/img.png"), color, FlipSettings{false, false}) .order_in_layer = 6; -- cgit v1.2.3