Changeset 3881 in orxonox.OLD for orxonox/trunk/src/world_entities/weapon.h
- Timestamp:
- Apr 18, 2005, 8:05:00 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapon.h
r3878 r3881 88 88 89 89 private: 90 int nrOfConfigs; //<! number of configurations defined91 90 int nrOfSlots; //<! number of weapon slots a ship has 92 91 int currConfID; //<! the currently selected config … … 101 100 102 101 public: 103 Weapon (PNode* parent, Vector* coordinate, Quaternion*direction);102 Weapon (PNode* parent, const Vector& coordinate, const Quaternion& direction); 104 103 virtual ~Weapon (); 105 104 … … 115 114 bool isActive(void); 116 115 117 void setWeaponIdleTime(float time);118 float getWeaponIdleTime(void);119 bool hasWeaponIdleTimeElapsed(void);120 116 117 /** 118 \brief sets a weapon idle time 119 \param idle time in ms 120 121 a weapon idle time is the time spend after a shoot until the weapon can 122 shoot again 123 */ 124 inline void setWeaponIdleTime(float time) { this->idleTime = time; } 125 /** 126 \brief gets the weapon idle time 127 \returns idle time in ms 128 129 a weapon idle time is the time spend after a shoot until the weapon can 130 shoot again 131 */ 132 inline float getWeaponIdleTime(void) const { return this->idleTime;} 133 /** 134 \brief checks if the idle time is elapsed 135 \return true if time is elapsed 136 137 a weapon idle time is the time spend after a shoot until the weapon can 138 shoot again 139 */ 140 inline bool hasWeaponIdleTimeElapsed(void) const { return (this->localTime>this->idleTime)?true:false; } 141 142 /** 143 \brief fires the weapon 144 145 this is called from the player.cc, when fire-button is been pushed 146 */ 121 147 virtual void fire(void) = 0; 122 148 virtual void hit (WorldEntity* weapon, Vector* loc);
Note: See TracChangeset
for help on using the changeset viewer.