light working.
This commit is contained in:
parent
d7970ed797
commit
44a7048c4a
9 changed files with 139 additions and 61 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue