Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4875 in orxonox.OLD for orxonox


Ignore:
Timestamp:
Jul 16, 2005, 10:02:29 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: prepare to create the new Weapon-System

File:
1 edited

Legend:

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

    r4836 r4875  
    5151  WS_IDLE          =    7,    //!< The State where the weapon is idle
    5252
    53   WS_STATE_COUNT  =     8      //!< This must match the count of the enumerations-members.
     53  WS_STATE_COUNT  =     8     //!< This must match the count of enumerations-members.
    5454} WeaponState;
    5555
     
    9595  inline float getWeaponIdleTime() const { return this->idleTime; };
    9696  /** @return true if idletime is elapsed else otherwise */
    97   inline bool hasWeaponIdleTimeElapsed() const { return (this->localTime>this->idleTime)?true:false; };
     97  inline bool hasWeaponIdleTimeElapsed() const { return (this->localTime > this->idleTime)?true:false; };
    9898
    9999  /**  fires the weapon */
     
    107107
    108108 protected:
    109 
    110109  float                localTime;                        //<! this is the local time. important for shooting attributes like frequency
    111110  float                idleTime;                         //<! the time a weapon needs before it can shoot again. eg. shooting frequency or actication/deactivateion delay
     
    115114  // PHASES //
    116115  ////////////
    117   float                times[WS_STATE_COUNT];            //!< Times to stay in the different States @see WeaponState
    118   SoundBuffer*         soundBuffers[WA_ACTION_COUNT];    //!< SoundBuffers for all actions @see WeaponAction
     116  WeaponState          currentState;                     //!< The State the weapon is in.
     117  float                stateTime;                        //!< how long the state has teken until now.
     118  float                times[WS_STATE_COUNT];            //!< Times to stay in the different States @see WeaponState.
     119  SoundBuffer*         soundBuffers[WA_ACTION_COUNT];    //!< SoundBuffers for all actions @see WeaponAction.
    119120  Animation3D*         animation[WS_STATE_COUNT];        //!< Animations for all the States (you can say yourself on what part of the gun this animation acts).
    120 
    121121
    122122  SoundBuffer*         fireSound;
    123123  SoundSource*         weaponSource;
    124124
     125  float                minCharge;
     126  float                maxCharge;
    125127
    126128 private:
    127    WeaponState          state;                           //!< The state this weapon is in.
    128129   bool                 enabled;                         //<! states if the weapon is enabled or not
    129130   Projectile*          projectile;                      //<! the projectile used for this weapon
Note: See TracChangeset for help on using the changeset viewer.