Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 20, 2005, 1:41:19 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: states are now flow'n through

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/weapons/weapon.h

    r4895 r4906  
    8181    float increaseEnergy(float energyToAdd);
    8282
    83     /** @returns true if the Weapon is Active */
    84     inline bool isActive() const { return this->active; };
     83    /** @returns true if the Weapon is Active  (this is used to check if the weapon must be drawn)*/
     84    inline bool isActive() const { return (this->currentState == WS_INACTIVE)?false:true; };
     85    /** @returns true if the weapon must be drawn */
     86    inline bool isVisible() const { return (this->currentState != WS_INACTIVE || !this->hideInactive)?true:false; };
    8587
    8688    // FUNCTIONS TO SET THE WEAPONS PROPERTIES.
     
    113115
    114116    Animation3D* getAnimation(WeaponState state, PNode* node = NULL);
     117    Animation3D* copyAnimation(WeaponState from, WeaponState to);
    115118
    116119    // FLOW
    117     virtual void tick(float dt);
     120    void tickW(float dt); //!< this is a function that must be called by the weaponManager, or any other weaponHandler, all other functions are handled from within
     121    virtual void tick(float dt) {};
    118122    virtual void draw();
    119123
     
    175179    PNode                emissionPoint;                   //!< The point, where the projectiles are emitted. (this is coppled with the Weapon by default)
    176180
    177     bool                 active;                          //!< states wheter the weapon is enabled or not
    178181    bool                 hideInactive;                    //!< Hides the Weapon if it is inactive
    179182    bool                 chargeable;                      //!< if the Weapon is charcheable
Note: See TracChangeset for help on using the changeset viewer.