Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8281 in orxonox.OLD for branches/atmospheric_engine/src/lib/graphics


Ignore:
Timestamp:
Jun 8, 2006, 5:24:05 PM (18 years ago)
Author:
hdavid
Message:

branches/atmospheric_engine: lightening effect

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/atmospheric_engine/src/lib/graphics/effects/lightening_effect.cc

    r8269 r8281  
    108108  this->billboard[3]->setAbsCoor(3000,850,0);
    109109  this->billboard[3]->setVisibiliy(false);
     110 
     111  this->flashLight = new Light();
     112  this->flashLight->setDiffuseColor(0,0,0);
     113  this->flashLight->setSpecularColor(0,0,0);
     114 
    110115/*
    111116  this->soundSource = NULL;
     
    169174 
    170175  this->time += dt;
    171 
    172   /*if( flashLight != NULL)
    173   {
    174     if((int)(100*time)%2)
    175       this->flashLight->setDiffuseColor(0,0,0);
    176     else
    177       this->flashLight->setDiffuseColor(100,100,100);
    178    
    179     //PRINTF(0)("100*time: %f %i\n", 100*time, (int)(100*time));
    180 }*/
    181176 
    182177  if( this->time > this->flashFrequency)
     
    184179    this->billboard[0]->setVisibiliy(true);
    185180    this->time = 0.0f;
    186    
    187     this->flashLight = new Light();
     181
    188182    this->flashLight->setAbsCoor(this->billboard[0]->getAbsCoor().x, this->billboard[0]->getAbsCoor().y, this->billboard[0]->getAbsCoor().z);
    189     this->flashLight->setDiffuseColor(100,100,100);
     183    this->flashLight->setDiffuseColor(1,1,1);
     184    this->flashLight->setSpecularColor(1,1,1);
    190185   
    191186    //this->soundSource.play(this->thunderBuffer);
     
    195190    this->billboard[3]->setVisibiliy(false);
    196191    this->time = 0.0f;
     192    this->flashLight->setDiffuseColor(0,0,0);
     193    this->flashLight->setSpecularColor(0,0,0);
    197194    this->bNewCoordinate = true;
    198    
    199     if(flashLight != NULL)
    200     {
    201       delete this->flashLight;
    202       flashLight = NULL;
    203     }
    204195  }
    205196
     
    208199    this->billboard[2]->setVisibiliy(false);
    209200    this->billboard[3]->setVisibiliy(true);
    210     this->flashLight->setDiffuseColor(100,100,100);
     201   // this->flashLight->setDiffuseColor(1,1,1);
     202   // this->flashLight->setSpecularColor(1,1,1);
    211203  }
    212204  else if( this->billboard[1]->isVisible() && this->time > this->flashRisingTime*2/3 )
     
    214206    this->billboard[1]->setVisibiliy(false);
    215207    this->billboard[2]->setVisibiliy(true);
    216     this->flashLight->setDiffuseColor(0,0,0);
     208    //this->flashLight->setDiffuseColor(0,0,0);
     209    //this->flashLight->setSpecularColor(0,0,0);
    217210  }
    218211  else if( this->billboard[0]->isVisible() && this->time > this->flashRisingTime*1/3 )
     
    220213    this->billboard[0]->setVisibiliy(false);
    221214    this->billboard[1]->setVisibiliy(true);
    222     this->flashLight->setDiffuseColor(100,100,100);
     215    //this->flashLight->setDiffuseColor(1,1,1);
     216    //this->flashLight->setSpecularColor(1,1,1);
    223217  }
    224218
Note: See TracChangeset for help on using the changeset viewer.