Particle Fix & Deleted Cout
This commit is contained in:
parent
ca1963612e
commit
98d08e622b
|
@ -1,4 +1,3 @@
|
||||||
#include <iostream>
|
|
||||||
#include "SynGame.hpp"
|
#include "SynGame.hpp"
|
||||||
|
|
||||||
#pragma region Particle
|
#pragma region Particle
|
||||||
|
@ -38,8 +37,6 @@
|
||||||
if(!isActive)
|
if(!isActive)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::cout << position.x << ", " << position.y << "\n";
|
|
||||||
|
|
||||||
remainingLifeTime -= deltaTime;
|
remainingLifeTime -= deltaTime;
|
||||||
ChangeColorOverLifeTime();
|
ChangeColorOverLifeTime();
|
||||||
}
|
}
|
||||||
|
@ -104,13 +101,13 @@
|
||||||
for (i = 0; i < particleSize; i++)
|
for (i = 0; i < particleSize; i++)
|
||||||
{
|
{
|
||||||
particle = &particles[i];
|
particle = &particles[i];
|
||||||
|
particle -> Update(deltaTime);
|
||||||
if(particle -> IsLifeTimeOver())
|
if(particle -> IsLifeTimeOver())
|
||||||
{
|
{
|
||||||
particle -> ResetRemainingLifeTime();
|
particle -> ResetRemainingLifeTime();
|
||||||
particle -> SetPosition(position.x, position.y, false);
|
particle -> SetPosition(position.x, position.y, false);
|
||||||
particle -> SetVelocity(sf::Vector2f(Random(-10.0, 10.0), Random(-10.0, 10.0)));
|
particle -> SetVelocity(sf::Vector2f(Random(-10.0, 10.0), Random(-10.0, 10.0)));
|
||||||
}
|
}
|
||||||
particle -> Update(deltaTime);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue