Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8068 in orxonox.OLD for trunk/src/world_entities/spawning_point.h


Ignore:
Timestamp:
Jun 1, 2006, 2:28:16 PM (18 years ago)
Author:
patrick
Message:

trunk: merged the network branche back to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/spawning_point.h

    r7370 r8068  
    99
    1010#include "world_entity.h"
     11
     12#include <map>
    1113
    1214class World;
     
    4345
    4446    /**  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 classID) { this->classID = classID; }
     47    void SpawningPoint::setSpawningEntity(ClassID classid) { this->classid = classid; }
    4648    /** sets the frequency with which the point is going to spawn entities (1/sec) @param frequency: the frequency */
    4749    void SpawningPoint::setSpawningDelay(float delay) { this->delay = delay; }
     
    4951    void SpawningPoint::setSpawningMode(int mode) { this->mode = (SpawningPointMode)mode; }
    5052
     53    void pushEntity(WorldEntity* entity, float delay = 0);
    5154
    5255    /** activates the spawning point */
    53     void activate() { this->bSpawning = true; }
     56    inline void activate() { this->bSpawning = true; }
    5457    /** 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; }
    5660
    5761
     
    6165
    6266  private:
    63     void spawn();
     67    void spawn(WorldEntity* entity);
    6468
    6569
    6670  private:
    67     float                     delay;                          //!< the timer that counts down until the next spawn
    68     float                     localTimer;                     //!< the local timer
    69     float                     seed;                           //!< the random seed of the position
    70     ClassID                   classID;                        //!< the classid of the entity to spawn
    71     SpawningPointMode         mode;                           //!< the mode of the spawning point
    72     ObjectManager::EntityList   queue;                          //!< queue of waiting WorldEntities to be spawned
    73     bool                      bSpawning;                      //!< flag to indicate if this spawning point is active or not
     71    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
    7478};
    7579
Note: See TracChangeset for help on using the changeset viewer.