Changeset 10362 in orxonox.OLD for branches/playability.new/src/world_entities/weapons/weapon.h
- Timestamp:
- Jan 25, 2007, 3:05:01 AM (17 years ago)
- Location:
- branches/playability.new
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability.new
- Property svn:ignore
-
old new 10 10 autom4te.cache 11 11 aclocal.m4 12 tags 13 test.bmp 14 config.sub 15 config.guess 16 OrxonoxPlayability.kdevses 17 OrxonoxPlayability.kdevelop.pcs
-
- Property svn:ignore
-
branches/playability.new/src/world_entities/weapons/weapon.h
r9869 r10362 126 126 127 127 // EMISSION 128 /** keeping old functions*/ 129 void setEmissionPoint(const Vector& point, int barrel); 128 130 void setEmissionPoint(const Vector& point); 129 131 /** @see void setEmissionPoint(const Vector& point); */ 132 inline void setEmissionPoint(float x, float y, float z, int barrel) { this->setEmissionPoint(Vector(x, y, z), barrel); }; 130 133 inline void setEmissionPoint(float x, float y, float z) { this->setEmissionPoint(Vector(x, y, z)); }; 131 134 /** @returns the absolute Position of the EmissionPoint */ 132 inline const Vector& getEmissionPoint() const { return this->emissionPoint.getAbsCoor(); }; 135 inline const Vector& getEmissionPoint(int barrel) const { return this->emissionPoint[barrel]->getAbsCoor(); }; 136 inline const Vector& getEmissionPoint() const { return this->emissionPoint[0]->getAbsCoor(); }; 137 133 138 134 139 inline void setDefaultTarget(PNode* defaultTarget) { this->defaultTarget = defaultTarget; }; … … 158 163 159 164 Animation3D* getAnimation(WeaponState state, PNode* node = NULL); 165 Animation3D* getAnimation(int barrel, int seg, PNode* node); 160 166 Animation3D* copyAnimation(WeaponState from, WeaponState to); 161 167 … … 169 175 bool check() const; 170 176 void debug() const; 177 178 inline int getBarrels() {return this->barrels; }; 179 inline int getSegs() { return this->segs; }; 180 inline void setBarrels(int barrels) { this->barrels = barrels; }; 181 inline void setSegs(int segs) { this->segs = segs; }; 182 183 inline Animation3D* getShootAnim(int barrel, int seg) { return this->shootAnim[barrel][seg]; }; 184 inline void setShootAnim(int barrel, int seg, PNode* component) { this->shootAnim[barrel][seg] = this->getAnimation(barrel, seg, component); }; 185 186 void init2(); 187 void deconstr(); 171 188 172 189 protected: … … 184 201 static WeaponState charToState(const std::string& state); 185 202 static const char* stateToChar(WeaponState state); 203 204 186 205 187 206 private: … … 214 233 float maxCharge; //!< The maximal energy to be loaded onto one projectile (this is only availible if chargeable is enabled) 215 234 216 OrxGui::GLGuiEnergyWidget * energyWidget;235 OrxGui::GLGuiEnergyWidgetVertical* energyWidget; 217 236 218 237 PNode* defaultTarget; //!< A target for targeting Weapons. … … 230 249 OrxSound::SoundBuffer soundBuffers[WA_ACTION_COUNT]; //!< SoundBuffers for all actions @see WeaponAction. 231 250 232 PNode 251 PNode** emissionPoint; //!< The point, where the projectiles are emitted. (this is coppled with the Weapon by default) 233 252 234 253 bool hideInactive; //!< Hides the Weapon if it is inactive … … 237 256 ClassID projectile; //!< the projectile used for this weapon (since they should be generated via macro and the FastFactory, only the ClassID must be known.) 238 257 FastFactory* projectileFactory; //!< A factory, that produces and handles the projectiles. 258 259 int barrels; //!< # of barrels 260 int segs; //!< # of segments, one barrel has 261 Animation3D*** shootAnim; 262 239 263 }; 240 264
Note: See TracChangeset
for help on using the changeset viewer.