aboutsummaryrefslogtreecommitdiff
path: root/src/example
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-30 16:44:47 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-11-30 16:44:47 +0100
commit1520cb55ad714583c3903f2988b0fdc38ede9c18 (patch)
tree49123f0f86eefc59e4cb9d12b87e67b2b9d62ab3 /src/example
parentad4f8acfb252b8be3a3fbb74ed97b32e498a26a4 (diff)
cleaner camera implementation
Diffstat (limited to 'src/example')
-rw-r--r--src/example/rendering_particle.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/example/rendering_particle.cpp b/src/example/rendering_particle.cpp
index b4bfeb2..9dcaa49 100644
--- a/src/example/rendering_particle.cpp
+++ b/src/example/rendering_particle.cpp
@@ -33,7 +33,7 @@ int main(int argc, char * argv[]) {
auto img = Texture("asset/texture/test_ap43.png");
Sprite & test_sprite = game_object.add_component<Sprite>(
- img, color, Sprite::FlipSettings{true, true}, 1, 1, 300);
+ img, color, Sprite::FlipSettings{true, true}, 1, 1, 1.95);
//game_object.add_component<Animator>(test_sprite, 4, 1, 0).active = true;
game_object.add_component<Animator>(test_sprite, 1, 1, 0).active = true;
@@ -60,9 +60,9 @@ int main(int argc, char * argv[]) {
});
*/
- auto & cam = game_object.add_component<Camera>(Color::WHITE, ivec2{1280, 720},
- vec2{400,300}, 0.5f);
- cam.offset.x = 0;
+ auto & cam = game_object.add_component<Camera>(Color::RED, ivec2{1280, 720},
+ vec2{2.59,1.95}, 2.0);
+ cam.offset.x = 1;
/*
game_object