2010-04-05 23:38:59 +02:00
|
|
|
#include "Model.h"
|
|
|
|
|
|
|
|
#include "RocketEntity.h"
|
|
|
|
#include "Controller.h"
|
|
|
|
|
|
|
|
#include <GL/gl.h>
|
|
|
|
|
|
|
|
namespace asteroids {
|
|
|
|
|
2011-02-13 15:31:42 +01:00
|
|
|
Engine::Variable RocketEntity::VarTimeToLive ("rocket_timetolive", "1.0");
|
|
|
|
Engine::Variable RocketEntity::VarSpeed ("rocket_speed", "15");
|
|
|
|
|
2010-04-05 23:38:59 +02:00
|
|
|
void RocketEntity::Update (float delta_sec) {
|
|
|
|
mSecToLive -= delta_sec;
|
|
|
|
|
|
|
|
if (mSecToLive <= 0.)
|
|
|
|
Engine::KillEntity (mId);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|