Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 12, 2008, 10:53:51 PM (16 years ago)
Author:
landauf
Message:
  • added feature to add a callback function to configvalues. they get called if the value changes. an examples is in Core.cc.
  • changed the SetConfigValue macro and the Identifier::updateConfigValues() function to work properly with inherited classes in both possible cases: 1) they overwrite the config-value or 2) they don't. an example is ParticleProjectile that defines it's own speed_ configvalue.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core3/src/orxonox/objects/Projectile.h

    r1552 r1596  
    4242            virtual ~Projectile();
    4343            void setConfigValues();
     44            void speedChanged();
    4445            void destroyObject();
    4546            virtual void tick(float dt);
    4647
    4748            static float getSpeed()
    48                 { return Projectile::speed_; }
     49                { return Projectile::speed_s; }
    4950
    5051        protected:
     
    5556            std::string explosionTemplateName_;
    5657            std::string smokeTemplateName_;
    57             static float speed_;
     58        protected:
     59            static float speed_s;
     60            float speed_;
     61        private:
    5862            float lifetime_;
    5963            float damage_;
Note: See TracChangeset for help on using the changeset viewer.