Redid many a thing for the sake of efficiency

This commit is contained in:
FakeShemp
2016-02-23 10:06:21 +01:00
parent 2c18068059
commit fb80d088e4
4 changed files with 118 additions and 121 deletions
+12 -8
View File
@@ -2,13 +2,17 @@
void ExplosionEffectSystem::UpdateComponent(EntityWrapper& entity, ComponentWrapper& component, double dt)
{
if ((double)component["TimeSinceDeath"] > (double)component["ExplosionDuration"]) {
(double)component["TimeSinceDeath"] = 0.f;
}
(double&)component["TimeSinceDeath"] += dt;
if ((double)component["TimeSinceDeath"] > (double)component["ExplosionDuration"]) {
(double)component["TimeSinceDeath"] = 0.f;
}
//if ((bool)Component["Gravity"] == true) {
// (bool)Component["ExponentialAccelaration"] = false;
//}
}
//((glm::vec2)component["Velocity"]).x = min(((glm::vec2)component["Velocity"]).x, ((glm::vec2)component["Velocity"]).y);
(double&)component["TimeSinceDeath"] += dt;
//if ((bool)component["Pulsate"] == true) {
// if ((double)component["TimeSinceDeath"] > (double)component["ExplosionDuration"] * 0.5) {
// (bool)component["Reverse"] = true;
// }
//}
}