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