Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6081 in orxonox.OLD for branches/network


Ignore:
Timestamp:
Dec 13, 2005, 11:12:45 AM (19 years ago)
Author:
patrick
Message:

network: spawning point interface definition

Location:
branches/network/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/world_entities/spawning_point.cc

    r6080 r6081  
    2020
    2121/**
    22  *  constructor
     22 *  standard constructor
    2323 */
    2424SpawningPoint::SpawningPoint (const Vector& absCoordinate)
    2525{}
     26
     27
     28/**
     29 *  constructor
     30 */
     31SpawningPoint::SpawningPoint (const Vector& position, float frequency, float seed, int classID)
     32{
     33}
    2634
    2735
     
    3240{}
    3341
     42
     43/**
     44 *  spawn the entity
     45 */
     46void SpawningPoint::spawn()
     47{}
    3448
    3549
  • branches/network/src/world_entities/spawning_point.h

    r6080 r6081  
    1515  public:
    1616    SpawningPoint (const Vector& absCoordinate = Vector(0.0, 0.0, 0.0));
     17    SpawningPoint (const Vector& position, float frequency, float seed, int classID);
    1718    virtual ~SpawningPoint ();
    1819
     20    void setSpawningEntity(int classID);
     21    void setSpawningFrequency(float frequency);
     22    void setPositionSeed(float seed);
     23
     24    /**  sets the entity that is going to be spawned by this point @param classID: the id from the class_id.h file */
     25    void SpawningPoint::setSpawningEntity(int classID) { this->classID = classID; }
     26    /** sets the frequency with which the point is going to spawn entities (1/sec) @param frequency: the frequency */
     27    void SpawningPoint::setSpawningFrequency(float frequency) { this->frequency = frequency; }
     28    /**  sets the seed of the position vector @param seed: the random seed around the given vector */
     29    void SpawningPoint::setPositionSeed(float seed) { this->seed = seed; }
    1930
    2031    void spawn();
    21     void setSpawningEntity();
    22 
    2332
    2433    virtual void tick(float dt);
     
    2635
    2736  private:
     37    float                frequency;                      //!< the frequency for entity spawning
     38    float                seed;                           //!< the random seed of the position
     39    int                  classID;                        //!< the classid of the entity to spawn
    2840
    2941};
Note: See TracChangeset for help on using the changeset viewer.