17 lines
408 B
C++
17 lines
408 B
C++
#include "explosion.hpp"
|
|
|
|
namespace game {
|
|
size_t s_id_counter = 0;
|
|
|
|
Explosion::Explosion(size_t id, const glm::vec2 &pos, const glm::vec2 &missileVelocity, Hit hit, float maxAge)
|
|
: id(id)
|
|
, hit(hit)
|
|
, position(pos)
|
|
, missileVelocity(missileVelocity)
|
|
, age(0.0)
|
|
, maxAge(maxAge * (1.0 + 0.1*util::randf_0_1()))
|
|
, maxRadius(0.05)
|
|
{
|
|
}
|
|
}
|
|
|