Skip to content

Commit da063e0

Browse files
committed
Added particles
1 parent 800a3af commit da063e0

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

Engine/src/Components/ParticleComponent.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,14 @@ void Prisma::ParticleComponent::ui() {
4949
if (!isStart()) {
5050
start();
5151
}
52+
5253
};
5354

5455
m_loadTexture = [&]() {
56+
if (!isStart()) {
57+
start();
58+
}
59+
5560
auto openFolder = WindowsHelper::getInstance().openFolder("All Files");
5661
if (!openFolder.empty() && Prisma::StringHelper::getInstance().endsWith(openFolder,"png")) {
5762
auto sprite = std::make_shared<Prisma::Texture>();
@@ -61,6 +66,10 @@ void Prisma::ParticleComponent::ui() {
6166
};
6267

6368
m_apply = [&]() {
69+
if (!isStart()) {
70+
start();
71+
}
72+
6473
m_sprite->numSprites(1, {m_width, m_height, m_speed, glm::vec3(1)});
6574
m_sprite->size(m_size);
6675
};

0 commit comments

Comments
 (0)