diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-29 12:21:26 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-29 12:21:26 +0100 |
commit | c2ef6a36532c8c078fd7836325d6be277b946cbf (patch) | |
tree | bcac24106220ad626aca5dfcd3576e7d60ac3af2 /src/test/ParticleTest.cpp | |
parent | 74bffd3e466c342ca80811146a536716fb6437cb (diff) | |
parent | 7a07c56d572a6f30d0aa611bd566197bc04c3b33 (diff) |
merge `loek/scripts`
Diffstat (limited to 'src/test/ParticleTest.cpp')
-rw-r--r-- | src/test/ParticleTest.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/test/ParticleTest.cpp b/src/test/ParticleTest.cpp index 8b81e74..4e9fa4e 100644 --- a/src/test/ParticleTest.cpp +++ b/src/test/ParticleTest.cpp @@ -1,11 +1,11 @@ -#include "api/Vector2.h" -#include <crepe/ComponentManager.h> +#include <crepe/manager/ComponentManager.h> #include <crepe/Particle.h> #include <crepe/api/Config.h> #include <crepe/api/GameObject.h> #include <crepe/api/ParticleEmitter.h> #include <crepe/api/Rigidbody.h> #include <crepe/api/Sprite.h> +#include <crepe/api/Texture.h> #include <crepe/api/Transform.h> #include <crepe/system/ParticleSystem.h> #include <gtest/gtest.h> @@ -16,9 +16,10 @@ using namespace std::chrono_literals; using namespace crepe; class ParticlesTest : public ::testing::Test { + Mediator m; public: - ComponentManager component_manager; - ParticleSystem particle_system{component_manager}; + ComponentManager component_manager{m}; + ParticleSystem particle_system{m}; void SetUp() override { ComponentManager & mgr = this->component_manager; @@ -28,9 +29,9 @@ public: GameObject game_object = mgr.new_object("", "", vec2{0, 0}, 0, 0); Color color(0, 0, 0, 0); + auto s1 = Texture("asset/texture/img.png"); Sprite & test_sprite = game_object.add_component<Sprite>( - make_shared<Texture>("asset/texture/img.png"), color, - FlipSettings{true, true}); + s1, color, Sprite::FlipSettings{true, true}, 1, 1, 100); game_object.add_component<ParticleEmitter>(ParticleEmitter::Data{ .position = {0, 0}, |