light working.

This commit is contained in:
Andreas Ortmann 2016-09-29 08:28:56 +02:00
parent d7970ed797
commit 44a7048c4a
9 changed files with 139 additions and 61 deletions

View file

@ -21,6 +21,8 @@
namespace game {
void State::init()
{
m_nextId = 0;
m_time = 0.0;
m_shipRadius = 0.02;
m_maxMissileDistance = 2.0;
m_playerRespawnTime = 2.0;
@ -253,6 +255,8 @@ namespace game {
void State::advance(float dt)
{
m_time += dt;
advancePlayerShipSpawns(dt);
advanceExplosions(dt);

View file

@ -77,6 +77,9 @@ namespace game {
// delete traces with this command
void deleteTrace(Trace *trace); // using a pointer
// get the current time
float timestamp() const { return m_time; }
/*************************************************************************/
/* Rendering */
/*************************************************************************/
@ -115,7 +118,8 @@ namespace game {
float m_playerRespawnTime;
float m_shipRadius;
float m_defaultEnergy;
int m_nextId=0;
int m_nextId;
int m_maxNumTraces;
float m_time;
};
};