Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 28, 2006, 6:21:24 PM (19 years ago)
Author:
stefalie
Message:

mountain_lake: fading works… sometimes :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/mountain_lake/src/world_entities/environments/mapped_water.cc

    r8877 r8884  
    1919#include "util/loading/resource_manager.h"
    2020#include "state.h"
     21#include "t_animation.h"
    2122#include "math.h"
    2223
     
    3940  if (root != NULL)
    4041    this->loadParams(root);
     42  this->newShineSize = this->shineSize;
     43
    4144
    4245  /// initialization of the textures
     
    9295  this->move = 0;
    9396  this->move2 = this->move * this->kNormalMapScale;
    94 
    95 
    9697}
    9798
     
    370371  this->move += this->waterFlow * dt;
    371372  this->move2 = this->move * this->kNormalMapScale;
    372  
    373 
    374 //   if(this->tempcounter == 100) {
    375 //     this->resetWaterColor(1, 0, 0);
    376 //     resetShininess(1);
    377 //     resetLightPos(0, 50, 0);
    378 //     PRINTF(0)("test waterchangecolor ");
    379 //     }
    380 //   tempcounter++;
     373
     374  // fading
     375  if(this->shineSize != this->newShineSize)
     376  {
     377    if(bFadeShineSize)
     378    {
     379      this->shineSizeFader = new tAnimation<MappedWater>(this, &MappedWater::resetShineSize);
     380      this->shineSizeFader->setInfinity(ANIM_INF_CONSTANT);
     381
     382      this->shineSizeFader->addKeyFrame(this->shineSize, this->shineSizeFadeTime, ANIM_LINEAR);
     383      this->shineSizeFader->addKeyFrame(this->newShineSize, 0, ANIM_LINEAR);
     384
     385      bFadeShineSize = false;
     386      this->shineSizeFader->replay();
     387    }
     388  }
     389
     390  if(this->tempcounter == 100)
     391  {
     392    PRINTF(0)("\n\n\n\n\n\n///////////////////////test waterchangecolor/////////////////////\n\n\n\n\n\n");
     393    this->fadeShineSize(1, 10);
     394  }
     395  //PRINTF(0)("counter %i/n", tempcounter);
     396  tempcounter++;
    381397
    382398//   if(this->tempcounter == 100) {
Note: See TracChangeset for help on using the changeset viewer.