Changeset 8820 in orxonox.OLD for branches/multi_player_map/src/world_entities/spawning_point.h
- Timestamp:
- Jun 27, 2006, 12:37:58 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/multi_player_map/src/world_entities/spawning_point.h
r8802 r8820 10 10 #include "playable.h" 11 11 12 #include "message_manager.h" 13 12 14 #include <list> 13 15 … … 19 21 float respawnTime; 20 22 WorldEntity * entity; 21 OM_LIST list;22 23 }; 23 24 … … 43 44 44 45 public: 45 SpawningPoint (ClassID classID, const Vector& position = Vector(0.0, 0.0, 0.0)); 46 SpawningPoint (const Vector& position, ClassID classID, SpawningPointMode type, float delay); 46 SpawningPoint(const TiXmlElement* root = NULL); 47 SpawningPoint(ClassID classID, const Vector& position = Vector(0.0, 0.0, 0.0)); 48 SpawningPoint(const Vector& position, ClassID classID, SpawningPointMode type, float delay); 47 49 virtual ~SpawningPoint (); 48 50 void init(); … … 50 52 virtual void loadParams(const TiXmlElement* root); 51 53 52 /** sets the entity that is going to be spawned by this point @param classID: the id from the class_id.h file */53 void SpawningPoint::setSpawningEntity(ClassID classid) { this->classid = classid; }54 /** sets the frequency with which the point is going to spawn entities (1/sec) @param frequency: the frequency */55 void SpawningPoint::setSpawningDelay(float delay) { this->delay = delay; }56 /** sets the spawning point mode @param mode: the mode */57 void SpawningPoint::setSpawningMode(int mode) { this->mode = (SpawningPointMode)mode; }58 59 54 inline int getTeamId(){ return this->teamId; } 60 55 inline void setTeamId( int teamId ){ this->teamId = teamId; } … … 75 70 private: 76 71 void spawn(WorldEntity* entity); 72 73 void sendRespawnMessage( int uniqueId ); 74 static bool respawnMessageHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId ); 77 75 78 76 79 77 private: 80 float delay; //!< the timer that counts down until the next spawn81 78 float localTimer; //!< the local timer 82 float seed; //!< the random seed of the position83 79 int teamId; //!< only spawn players of this team 84 ClassID classid; //!< the classid of the entity to spawn85 SpawningPointMode mode; //!< the mode of the spawning point86 80 std::list<QueueEntry> queue; //!< queue of waiting WorldEntities to be spawned 87 81 bool bSpawning; //!< flag to indicate if this spawning point is active or not
Note: See TracChangeset
for help on using the changeset viewer.