finally fixed the particle system.

This commit is contained in:
Andreas Ortmann 2016-09-30 20:19:10 +02:00
parent 185f7d2748
commit 067cfb6203
8 changed files with 100 additions and 47 deletions

View file

@ -19,6 +19,8 @@ namespace game {
, maxAge(maxAge * (1.0 + 0.1*util::randf_0_1()))
, maxRadius(0.05)
{
static size_t id_counter = 0;
id = id_counter++;
}
const Hit hit; // kind of the explosion depends on the hit type
@ -29,5 +31,7 @@ namespace game {
// anymore and will disappear afterwards
const float maxAge;
const float maxRadius; // current radius depends on time.
size_t id;
};
}