Changeset 8022 in orxonox.OLD
- Timestamp:
- May 31, 2006, 1:01:38 PM (18 years ago)
- Location:
- branches/atmospheric_engine/src/lib/graphics/effects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.cc
r7810 r8022 53 53 } 54 54 55 this->activate(); 55 if(snowActivate) 56 this->activate(); 56 57 } 57 58 … … 78 79 LoadParam(root, "size", this, SnowEffect, size); 79 80 LoadParam(root, "coord", this, SnowEffect, coord); 81 82 LOAD_PARAM_START_CYCLE(root, element); 83 { 84 LoadParam_CYCLE(element, "option", this, SnowEffect, setSnowOption); 85 } 86 LOAD_PARAM_END_CYCLE(element); 80 87 } 81 88 … … 85 92 86 93 // Default values 94 this->snowActivate = false; 95 this->snowMove = false; 87 96 this->particles = 12000; 88 97 this->texture = "maps/snow_flake_01_32x32.png"; … … 103 112 this->snowWindForce = 1; 104 113 105 this->activated = false;114 // this->activated = false; 106 115 } 107 116 … … 109 118 { 110 119 PRINTF(0)("Activating SnowEffect\n"); 111 activated = true;120 // activated = true; 112 121 113 122 SnowEffect::snowParticles = new SpriteParticles(particles); … … 141 150 { 142 151 PRINTF(0)("Deactivating SnowEffect\n"); 143 activated = false;152 //activated = false; 144 153 145 154 this->emitter->setSystem(NULL); … … 165 174 166 175 void SnowEffect::tick(float dt) 167 { 176 {/* 168 177 float distance = (State::getCameraNode()->getAbsCoor() - Vector(snowCoord.x, State::getCameraNode()->getAbsCoor().y, snowCoord.z)).len(); 169 178 … … 197 206 SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2); 198 207 SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0); 208 }*/ 209 if (this->snowMove) { 210 this->snowCoord = State::getCameraNode()->getAbsCoor(); 211 this->emitter->setRelCoor(this->snowCoord.x , this->snowCoord.y+300, this->snowCoord.z); 199 212 } 200 213 } -
branches/atmospheric_engine/src/lib/graphics/effects/snow_effect.h
r7810 r8022 49 49 inline void coord(float x, float y, float z) { this->snowCoord = Vector(x, y, z); } 50 50 inline void wind(int force) { this->snowWindForce = force; } 51 inline void setSnowOption(const std::string& option) { /*if (option == "fade") this->snowFade = true;*/ 52 if (option == "movesnow") this->snowMove = true; 53 if (option == "activate") this->snowActivate = true; } 51 54 52 55 … … 65 68 int snowWindForce; 66 69 67 bool activated; 68 70 //bool activated; 71 bool snowMove; 72 bool snowActivate; 73 69 74 PlaneEmitter* emitter; 70 75
Note: See TracChangeset
for help on using the changeset viewer.