Pulsate system implemented.
This commit is contained in:
@@ -4,15 +4,18 @@ void ExplosionEffectSystem::UpdateComponent(EntityWrapper& entity, ComponentWrap
|
||||
{
|
||||
if ((double)component["TimeSinceDeath"] > (double)component["ExplosionDuration"]) {
|
||||
(double)component["TimeSinceDeath"] = 0.f;
|
||||
if ((bool)component["Pulsate"] == true) {
|
||||
(bool)component["Reverse"] = 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;
|
||||
// }
|
||||
//}
|
||||
if ((bool)component["Pulsate"] == true) {
|
||||
if ((double)component["TimeSinceDeath"] > (double)component["ExplosionDuration"] * 0.5) {
|
||||
(bool)component["Reverse"] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user