diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-11-25 19:39:11 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-11-25 19:39:11 +0100 |
commit | 9aca3626e31a7549f8c436672d4f479bd64c0057 (patch) | |
tree | 9255aa25ceea4d50cc50474bc27a50a007ce008d /src/example | |
parent | b570225f5166b18fdd881fc53cd7013669067ca1 (diff) |
fixed a rezing and camera origin is now middlepoint
Diffstat (limited to 'src/example')
-rw-r--r-- | src/example/rendering_particle.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/example/rendering_particle.cpp b/src/example/rendering_particle.cpp index fad174e..36997be 100644 --- a/src/example/rendering_particle.cpp +++ b/src/example/rendering_particle.cpp @@ -24,7 +24,7 @@ using namespace std; int main(int argc, char * argv[]) { ComponentManager mgr; - GameObject game_object = mgr.new_object("", "", Vector2{1000, 500}, 0, 1); + GameObject game_object = mgr.new_object("", "", Vector2{0, 0}, 0, 1); RenderSystem sys{mgr}; ParticleSystem psys{mgr}; AnimatorSystem asys{mgr}; @@ -62,7 +62,8 @@ int main(int argc, char * argv[]) { }); */ - game_object.add_component<Camera>(Color::WHITE); + auto & cam = game_object.add_component<Camera>(Color::WHITE); + cam.pos = {500, 200}; /* game_object |