Changeset 8267 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
- Timestamp:
- Jun 8, 2006, 4:28:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
r8261 r8267 86 86 LoadParam(root, "life", this, RainEffect, setRainLife); 87 87 LoadParam(root, "wind", this, RainEffect, setRainWind); 88 LoadParam(root, "startraining", this, RainEffect, setRainStart); 88 LoadParam(root, "fadeinduration", this, RainEffect, setRainFadeIn); 89 LoadParam(root, "fadeoutduration", this, RainEffect, setRainFadeOut); 89 90 90 91 LOAD_PARAM_START_CYCLE(root, element); … … 109 110 this->rainMaxParticles = this->rainRate * this->rainLife; 110 111 this->rainWindForce = 0; 111 this->rainStartDuration = 0; 112 this->rainFadeInDuration = 0; 113 this->rainFadeOutDuration = 0; 112 114 this->localTimer = 0; 113 115 this->soundRainVolume = 0.8f; … … 117 119 lightMan = LightManager::getInstance(); 118 120 this->rainAmbient = lightMan->getAmbientColor(); 121 122 return 0; 119 123 } 120 124 … … 155 159 156 160 lightMan->setAmbientColor(.1,.1,.1); 161 162 return 0; 157 163 } 158 164 … … 170 176 // Restore Light Ambient 171 177 lightMan->setAmbientColor(this->rainAmbient, this->rainAmbient, this->rainAmbient); 178 179 return 0; 172 180 } 173 181 … … 182 190 } 183 191 184 if (this->rain StartDuration != 0 && this->localTimer < this->rainStartDuration) {192 if (this->rainFadeInDuration != 0 && this->localTimer < this->rainFadeInDuration) { 185 193 this->localTimer += dt; 186 float progress = this->localTimer / this->rain StartDuration;194 float progress = this->localTimer / this->rainFadeInDuration; 187 195 188 196 // Dim Light … … 210 218 this->deactivate(); 211 219 212 this->rainStartDuration = 10; 220 if (!this->rainFadeInDuration > 0) 221 this->rainFadeInDuration = 20; 222 213 223 this->localTimer = 0; 214 224 this->activate();
Note: See TracChangeset
for help on using the changeset viewer.