adding explosion stuff, adding trace file.

This commit is contained in:
Andreas Ortmann 2016-09-27 19:26:16 +02:00
parent 3c716decdd
commit 56ccdfb1fd
3 changed files with 17 additions and 6 deletions

View file

@ -1,17 +1,28 @@
#pragma once
#if 0
/**
* Explosion: just an effect which looks good.
*/
class Explosion {
public:
enum class Kind {
Normal,
MissileWithShip
MissileExplodesInSpace, // missile explode in free space
MissileAgainstPlanet, // explosion of missile when it hits a planet
MissileAgainstShip // bigger explosion: missile hits a ship which explodes with it
};
glm::vec2 position;
Explosion(const glm::vec2 &pos, Kind kind, float maxAge=1.0)
: position(pos), kind(kind), age(0.0), maxAge(maxAge)
{
}
Explosion(Kind kind);
const Kind kind; // kind of the explosion
const glm::vec2 position; // position where it starts
float age; // age (in seconsd) of the explosion
public:
// age (in seconds) when the explosion is not visible
// anymore and will disappear afterwards
const float maxAge;
};
#endif

0
game/state/trace.cpp Normal file
View file

0
game/state/trace.hpp Normal file
View file