Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 8, 2006, 2:04:37 PM (19 years ago)
Author:
amaechler
Message:

branches/atmospheric_engine: general activate, cleanups

File:
1 edited

Legend:

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

    r8023 r8242  
    3333                virtual bool deactivate();
    3434
     35                inline void activateSnow() { this->activate(); }
     36                inline void deactivateSnow() { this->deactivate(); }
     37               
    3538                virtual void draw() const;
    3639                virtual void tick(float dt);
    3740
    38     void activateSnow() { this->activate(); }
    39     void deactivateSnow() { this->deactivate(); }
    4041
    4142                inline void numParticles(int n) { this->particles = n; }
     
    4849                inline void size(float sizeX, float sizeY) { this->snowSize = Vector2D(sizeX, sizeY); }
    4950                inline void coord(float x, float y, float z) { this->snowCoord = Vector(x, y, z); }
    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                inline void wind(int force) { this->snowWindForce = force; }
     52
     53                inline void setSnowOption(const std::string& option) {
     54                        /*if (option == "fade") this->snowFade = true;*/
     55                        if (option == "movesnow") this->snowMove = true;
     56                        if (option == "activate") this->snowActivate = true;
     57                }
    5458
    5559
    5660        private:
    57                 int                                                                                                                             particles;
    58                 std::string                                                                                             texture;
    59                 float                                                                                                                   life, randomLife;
    60                 float                                                                                                                           snowRadius, randomRadius;
    61                 float                                                                                                                           snowMass, randomMass;
    62                 float                                                                                                                   rate;
    63                 float                                                                                                                   velocity, randomVelocity;
    64                 float                                                                                                                   angle, randomAngle;
    65                 float                                                                                                                   alpha;
    66                 Vector                                                                                                                  snowCoord;
    67                 Vector2D                                                                                                                snowSize;
    68                 int                                                                                                                                     snowWindForce;
     61                int                             particles;
     62                std::string                     texture;
     63                float                           life, randomLife;
     64                float                           snowRadius, randomRadius;
     65                float                           snowMass, randomMass;
     66                float                           rate;
     67                float                           velocity, randomVelocity;
     68                float                           angle, randomAngle;
     69                float                           alpha;
     70                Vector                          snowCoord;
     71                Vector2D                        snowSize;
     72                int                             snowWindForce;
    6973
    70                 //bool                                                                                                                          activated;
    71     bool                              snowMove;
    72     bool                              snowActivate;
    73    
    74                 PlaneEmitter*                                                                                           emitter;
     74                bool                            snowMove;
     75                bool                            snowActivate;
    7576
    76                 static SpriteParticles*                                                 snowParticles;
    77                 OrxSound::SoundSource              soundSource;
    78                 OrxSound::SoundBuffer*             windBuffer;
     77                PlaneEmitter*                   emitter;
     78
     79                static SpriteParticles*         snowParticles;
     80                OrxSound::SoundSource           soundSource;
     81                OrxSound::SoundBuffer*          windBuffer;
    7982
    8083};
Note: See TracChangeset for help on using the changeset viewer.