Changeset 6084 in orxonox.OLD for branches/network/src/world_entities/spawning_point.cc
- Timestamp:
- Dec 13, 2005, 11:40:03 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/world_entities/spawning_point.cc
r6083 r6084 23 23 */ 24 24 SpawningPoint::SpawningPoint (const Vector& absCoordinate, const World* world) 25 {} 25 : WorldEntity(absCoodrinate) 26 { 27 this->world = world; 28 this->frequency = 0.5f; 29 this->seed = 0.0f; 30 this->countDown = 0.0f; 31 } 26 32 27 33 … … 37 43 this->classID = classID; 38 44 this->world = world; 45 this->countDown = 0.0f; 39 46 } 40 47 … … 60 67 61 68 62 63 69 /** 64 70 * this method is called every frame … … 68 74 */ 69 75 void SpawningPoint::tick(float dt) 70 {} 76 { 77 this->countDown += dt; 78 if( this->countDown > this->frequency) 79 { 80 this->spawn(); 81 this->countDown = 0.0f; 82 } 83 } 71 84 72 85
Note: See TracChangeset
for help on using the changeset viewer.