aboutsummaryrefslogtreecommitdiff
path: root/src/example
diff options
context:
space:
mode:
authormax-001 <maxsmits21@kpnmail.nl>2024-11-22 14:35:04 +0100
committermax-001 <maxsmits21@kpnmail.nl>2024-11-22 14:35:04 +0100
commita11b647bec22890be44d68d15de6b73f8955722d (patch)
treebbdd12e1a2ec6fe423f036c98b2cd13ab5f3c319 /src/example
parent3965297b579351745c0f5c87aa12829f707c98fd (diff)
Replaced Vector2<double> by vec2 typedef
Diffstat (limited to 'src/example')
-rw-r--r--src/example/rendering_particle.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/example/rendering_particle.cpp b/src/example/rendering_particle.cpp
index 9b4ce83..1a36529 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<double>{100, 100}, 0, 0.1);
+ GameObject game_object = mgr.new_object("", "", vec2{100, 100}, 0, 0.1);
RenderSystem sys{mgr};
ParticleSystem psys{mgr};
Color color(255, 255, 255, 255);
Sprite & test_sprite = game_object.add_component<Sprite>(
- make_shared<Texture>("../asset/texture/img.png"), color, FlipSettings{false, false});
+ make_shared<Texture>("asset/texture/img.png"), color, FlipSettings{false, false});
test_sprite.order_in_layer = 5;
auto & test = game_object.add_component<ParticleEmitter>(ParticleEmitter::Data{
@@ -43,11 +43,11 @@ int main(int argc, char * argv[]) {
.max_angle = 20,
.begin_lifespan = 0,
.end_lifespan = 60,
- .force_over_time = Vector2<double>{0, 0},
+ .force_over_time = vec2{0, 0},
.boundary{
.width = 1000,
.height = 1000,
- .offset = Vector2<double>{0, 0},
+ .offset = vec2{0, 0},
.reset_on_exit = false,
},
.sprite = test_sprite,
@@ -55,7 +55,7 @@ int main(int argc, char * argv[]) {
game_object.add_component<Camera>(Color::WHITE);
game_object
- .add_component<Sprite>(make_shared<Texture>("../asset/texture/img.png"), color,
+ .add_component<Sprite>(make_shared<Texture>("asset/texture/img.png"), color,
FlipSettings{false, false})
.order_in_layer
= 6;