Changeset 5498 in orxonox.OLD for trunk/src/world_entities/weapons/projectile.h
- Timestamp:
- Nov 7, 2005, 10:43:22 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/weapons/projectile.h
r5447 r5498 1 1 /*! 2 2 * @file projectile.h 3 * a projectile, that is been shooted by a weapon 4 5 You can use this class to make some shoots, but this isn't the real idea. If you want to just test, if the 6 shooting funcions work, use the Projectile class. But if you want to implement your own shoots its 7 different:<br> 8 Make a new class and derive it from Projectile. To have a weapon work well, reimplement the functions 9 - void tick() 10 - void draw() 11 - void hit() (only if you have working collision detection) 12 When you have implemented these functions you have just to add the projectiles to your weapon. You ll want 13 to make this by looking into the function 14 - Weapon::fire() 15 there you just change the line: 16 Projectile* pj = new Projectile(); TO Projectile* pj = new MyOwnProjectileClass(); 17 and schwups it works... :) 18 */ 3 * a projectile, that is been shooted by a weapon 4 * 5 * You can use this class to make some Projectiles/Bullets/Lasers/Rockets/etc. 6 * 7 */ 19 8 20 9 #ifndef _PROJECTILE_H … … 22 11 23 12 #include "world_entity.h" 24 25 class FastFactory;26 13 27 14 class Projectile : public WorldEntity … … 57 44 protected: 58 45 // energy 59 float energyMin; 60 float energyMax; 46 float energyMin; //!< The minimal Energy a Projectile needs to be emitted. 47 float energyMax; //!< The maximal Energy a Projectile can take, before being emitted. 61 48 bool bChargeable; //!< if the Projectile is Charegeable 62 49
Note: See TracChangeset
for help on using the changeset viewer.