Changeset 8068 in orxonox.OLD for trunk/src/world_entities/spawning_point.h
- Timestamp:
- Jun 1, 2006, 2:28:16 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/spawning_point.h
r7370 r8068 9 9 10 10 #include "world_entity.h" 11 12 #include <map> 11 13 12 14 class World; … … 43 45 44 46 /** sets the entity that is going to be spawned by this point @param classID: the id from the class_id.h file */ 45 void SpawningPoint::setSpawningEntity(ClassID class ID) { this->classID = classID; }47 void SpawningPoint::setSpawningEntity(ClassID classid) { this->classid = classid; } 46 48 /** sets the frequency with which the point is going to spawn entities (1/sec) @param frequency: the frequency */ 47 49 void SpawningPoint::setSpawningDelay(float delay) { this->delay = delay; } … … 49 51 void SpawningPoint::setSpawningMode(int mode) { this->mode = (SpawningPointMode)mode; } 50 52 53 void pushEntity(WorldEntity* entity, float delay = 0); 51 54 52 55 /** activates the spawning point */ 53 void activate() { this->bSpawning = true; }56 inline void activate() { this->bSpawning = true; } 54 57 /** deactivates the spawning point */ 55 void deactivate() { this->bSpawning = false; } 58 inline void deactivate() { this->bSpawning = false; } 59 inline bool isActive() const { return this->bSpawning; } 56 60 57 61 … … 61 65 62 66 private: 63 void spawn( );67 void spawn(WorldEntity* entity); 64 68 65 69 66 70 private: 67 float delay; //!< the timer that counts down until the next spawn68 float localTimer; //!< the local timer69 float seed; //!< the random seed of the position70 ClassID classID; //!< the classid of the entity to spawn71 SpawningPointMode mode; //!< the mode of the spawning point72 ObjectManager::EntityListqueue; //!< queue of waiting WorldEntities to be spawned73 bool bSpawning; //!< flag to indicate if this spawning point is active or not71 float delay; //!< the timer that counts down until the next spawn 72 float localTimer; //!< the local timer 73 float seed; //!< the random seed of the position 74 ClassID classid; //!< the classid of the entity to spawn 75 SpawningPointMode mode; //!< the mode of the spawning point 76 std::map<WorldEntity*, float> queue; //!< queue of waiting WorldEntities to be spawned 77 bool bSpawning; //!< flag to indicate if this spawning point is active or not 74 78 }; 75 79
Note: See TracChangeset
for help on using the changeset viewer.