fysxasteroids/asteroids/RocketEntity.cc

21 lines
383 B
C++

#include "Model.h"
#include "RocketEntity.h"
#include "Controller.h"
#include <GL/gl.h>
namespace asteroids {
Engine::Variable RocketEntity::VarTimeToLive ("rocket_timetolive", "1.0");
Engine::Variable RocketEntity::VarSpeed ("rocket_speed", "15");
void RocketEntity::Update (float delta_sec) {
mSecToLive -= delta_sec;
if (mSecToLive <= 0.)
Engine::KillEntity (mId);
}
}