Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 31, 2006, 1:01:38 PM (18 years ago)
Author:
hdavid
Message:

branches/atmospheric_engine: activating/deactivating snowEffect in the oxw-file works,default: deactivate

File:
1 edited

Legend:

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

    r7810 r8022  
    5353        }
    5454
    55         this->activate();
     55  if(snowActivate)
     56    this->activate();
    5657}
    5758
     
    7879        LoadParam(root, "size", this, SnowEffect, size);
    7980        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);
    8087}
    8188
     
    8592
    8693        // Default values
     94  this->snowActivate = false;
     95  this->snowMove = false;
    8796        this->particles = 12000;
    8897        this->texture = "maps/snow_flake_01_32x32.png";
     
    103112        this->snowWindForce = 1;
    104113
    105         this->activated = false;
     114//      this->activated = false;
    106115}
    107116
     
    109118{
    110119        PRINTF(0)("Activating SnowEffect\n");
    111         activated = true;
     120//      activated = true;
    112121
    113122        SnowEffect::snowParticles = new SpriteParticles(particles);
     
    141150{
    142151        PRINTF(0)("Deactivating SnowEffect\n");
    143         activated = false;
     152        //activated = false;
    144153
    145154        this->emitter->setSystem(NULL);
     
    165174
    166175void SnowEffect::tick(float dt)
    167 {
     176{/*
    168177  float distance = (State::getCameraNode()->getAbsCoor() - Vector(snowCoord.x, State::getCameraNode()->getAbsCoor().y, snowCoord.z)).len();
    169178 
     
    197206    SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2);
    198207    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);
    199212  }
    200213}
Note: See TracChangeset for help on using the changeset viewer.