Changeset 7216 in orxonox.OLD for branches/std/src/world_entities/power_ups
- Timestamp:
- Mar 12, 2006, 8:54:30 AM (19 years ago)
- Location:
- branches/std/src/world_entities/power_ups
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/std/src/world_entities/power_ups/param_power_up.cc
r7193 r7216 81 81 } 82 82 83 void ParamPowerUp::setType(const char*type)83 void ParamPowerUp::setType(const std::string& type) 84 84 { 85 85 for(int i = 0; i < POWERUP_PARAM_size; ++i) { 86 if( strcmp(type, paramTypes[i]) == 0) {86 if(type == paramTypes[i]) { 87 87 this->type = (EnumParamPowerUpType)i; 88 88 break; -
branches/std/src/world_entities/power_ups/param_power_up.h
r7065 r7216 28 28 void setMaxValue(float value); 29 29 void setMinValue(float value); 30 void setType(const char*type);30 void setType(const std::string& type); 31 31 EnumParamPowerUpType getType(); 32 32 float getValue(); … … 43 43 44 44 private: 45 static const char* paramTypes[]; 46 EnumParamPowerUpType type; 47 float value; 48 float max_value; 49 float min_value; 45 EnumParamPowerUpType type; 46 float value; 47 float max_value; 48 float min_value; 49 50 static const char* paramTypes[]; 51 50 52 }; 51 53 -
branches/std/src/world_entities/power_ups/power_up.cc
r7207 r7216 182 182 }; 183 183 184 void PowerUp::setRespawnType(const char* type) 184 185 void PowerUp::setRespawnType(const std::string& type) 185 186 { 186 187 for(int i = 0; i < RESPAWN_size; ++i) 187 188 { 188 if( !strcmp(type, respawnTypes[i]))189 if(type == respawnTypes[i]) 189 190 { 190 191 this->respawnType = (PowerUpRespawn)i; -
branches/std/src/world_entities/power_ups/power_up.h
r7207 r7216 31 31 virtual void draw () const; 32 32 virtual void tick(float dt); 33 void setRespawnType(const char*type);33 void setRespawnType(const std::string& type); 34 34 void setRespawnTime(const float respawn); 35 35 … … 45 45 46 46 private: 47 SoundSource soundSource;48 SoundBuffer* pickupBuffer;49 SoundBuffer* respawnBuffer;50 Material* sphereMaterial;51 PowerUpRespawn respawnType;52 float respawnTime;53 float respawnStart;54 static const char* respawnTypes[];47 SoundSource soundSource; 48 SoundBuffer* pickupBuffer; 49 SoundBuffer* respawnBuffer; 50 Material* sphereMaterial; 51 PowerUpRespawn respawnType; 52 float respawnTime; 53 float respawnStart; 54 static const char* respawnTypes[]; 55 55 56 WorldEntity* collider;56 WorldEntity* collider; 57 57 }; 58 58
Note: See TracChangeset
for help on using the changeset viewer.