- Timestamp:
- Jan 3, 2014, 10:05:55 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/gametypes/SpaceRaceController.h
r9962 r9966 39 39 public Tickable 40 40 { 41 public: 42 SpaceRaceController(Context* context); 43 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 44 virtual ~SpaceRaceController(); 45 virtual void tick(float dt); 46 41 47 private: 42 std::vector<RaceCheckPoint*> staticRacePoints_;43 RaceCheckPoint* nextRaceCheckpoint_; // checkpoint that should be reached44 RaceCheckPoint* currentRaceCheckpoint_; // last checkPoint (already reached)45 std::vector<RaceCheckPoint*> checkpoints_;46 Vector3 lastPositionSpaceship;47 int virtualCheckPointIndex;48 49 48 float recCalculateDistance(RaceCheckPoint*, Vector3 currentPosition); 50 49 float distanceSpaceshipToCheckPoint(RaceCheckPoint*); 51 50 RaceCheckPoint* nextPointFind(RaceCheckPoint*); 52 51 RaceCheckPoint* adjustNextPoint(); 53 std::vector<RaceCheckPoint*> findStaticCheckpoints(std::vector< 54 RaceCheckPoint*>); 52 std::vector<RaceCheckPoint*> findStaticCheckpoints(std::vector<RaceCheckPoint*>); 55 53 std::vector<RaceCheckPoint*> staticCheckpoints(); 56 int rekSimulationCheckpointsReached(RaceCheckPoint*, std::map< 57 RaceCheckPoint*, int>*); 54 int rekSimulationCheckpointsReached(RaceCheckPoint*, std::map<RaceCheckPoint*, int>*); 58 55 // same as SpaceRaceManager, but needed to add virtuell Checkpoints ( Checkpoints which don't exist but needed to avoid collisions with big Objects) 59 56 RaceCheckPoint* findCheckpoint(int index) const; … … 64 61 //void computeVirtualCheckpoint(RaceCheckPoint*, RaceCheckPoint*, std::vector<StaticEntity*>); 65 62 66 public: 67 SpaceRaceController(Context* context); 68 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 69 virtual ~SpaceRaceController(); 70 virtual void tick(float dt); 63 std::vector<RaceCheckPoint*> staticRacePoints_; 64 RaceCheckPoint* nextRaceCheckpoint_; // checkpoint that should be reached 65 RaceCheckPoint* currentRaceCheckpoint_; // last checkPoint (already reached) 66 std::vector<RaceCheckPoint*> checkpoints_; 67 Vector3 lastPositionSpaceship; 68 int virtualCheckPointIndex; 71 69 }; 72 70
Note: See TracChangeset
for help on using the changeset viewer.