Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/base/racetrack.h')
-rw-r--r--src/game/base/racetrack.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/game/base/racetrack.h b/src/game/base/racetrack.h
index 922a94f..80a5766 100644
--- a/src/game/base/racetrack.h
+++ b/src/game/base/racetrack.h
@@ -19,23 +19,34 @@ class CheckPoint;
/* ---- class RaceTrack -------------------------------------------- */
+/// a race track entity
class RaceTrack : public core::EntityDynamic {
public:
- typedef std::list<CheckPoint *> CheckPoints ;
-
+ /// default constructor
RaceTrack();
+
+ /// default destructor
virtual ~RaceTrack();
+ /// list of racetrack checkpoints
+ typedef std::list<CheckPoint *> CheckPoints ;
+
+ /// the player who activated the race
+ inline core::Player *player() { return track_player; }
+
+ /// add a checkpoint to the racetrack
void add_checkpoint(CheckPoint *checkpoint);
/// reset the race track
void reset();
- virtual void frame(float elapsed);
-
- inline core::Player *player() { return track_player; }
+ /// entity received a docking request
+ virtual void dock(core::Entity *entity);
+ /// run one time frame
+ virtual void frame(float elapsed);
+
private:
CheckPoints track_checkpoints;
core::Player *track_player;
@@ -47,6 +58,7 @@ private:
/* ---- class CheckPoint ------------------------------------------- */
+/// a checkpoint for the race track
class CheckPoint : public core::EntityDynamic {
public:
CheckPoint(RaceTrack *parent);