Changeset 4932 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons
- Timestamp:
- Jul 22, 2005, 12:08:51 PM (19 years ago)
- Location:
- orxonox/trunk/src/world_entities/weapons
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/projectile.cc
r4927 r4932 31 31 * standard constructor 32 32 */ 33 Projectile::Projectile ( Weapon* weapon) : WorldEntity()33 Projectile::Projectile () : WorldEntity() 34 34 { 35 35 this->setClassID(CL_PROJECTILE, "Projectile"); 36 36 37 this->weapon = weapon;38 37 this->lifeCycle = 0.0; 39 38 this->lifeSpan = 0.75f; /* sec */ -
orxonox/trunk/src/world_entities/weapons/projectile.h
r4927 r4932 25 25 26 26 class Vector; 27 class Weapon;28 27 class ParticleEmitter; 29 28 … … 31 30 { 32 31 public: 33 Projectile ( Weapon* weapon);32 Projectile (); 34 33 virtual ~Projectile (); 35 34 … … 57 56 58 57 Vector flightDirection; //!< direction in which the shoot flighs 59 Weapon* weapon; //!< weapon the shoot belongs to.60 58 61 59 Vector velocity; //!< velocity of the projectile. -
orxonox/trunk/src/world_entities/weapons/test_bullet.cc
r4892 r4932 21 21 #include "model.h" 22 22 #include "vector.h" 23 #include "object_manager.h" 23 24 24 25 using namespace std; 25 26 27 CREATE_FAST_FACTORY(TestBullet, CL_TEST_BULLET); 26 28 27 29 /** 28 30 * standard constructor 29 31 */ 30 TestBullet::TestBullet ( Weapon* weapon) : Projectile(weapon)32 TestBullet::TestBullet () : Projectile() 31 33 { 32 34 this->setClassID(CL_TEST_BULLET, "TestBullet"); -
orxonox/trunk/src/world_entities/weapons/test_bullet.h
r4892 r4932 15 15 { 16 16 public: 17 TestBullet ( Weapon* weapon);17 TestBullet (); 18 18 virtual ~TestBullet (); 19 19 -
orxonox/trunk/src/world_entities/weapons/test_gun.cc
r4931 r4932 35 35 #include "object_manager.h" 36 36 37 CREATE_FAST_OBJECT(TestGun, CL_TEST_GUN);38 37 39 38 using namespace std; … … 97 96 this->weaponSource = new SoundSource(this->fireSound, this); 98 97 this->weaponSource->setRolloffFactor(.1);*/ 99 Projectile* p = new TestBullet( this);98 Projectile* p = new TestBullet(); 100 99 101 100 // ObjectManager::getInstance()->cache(CL_TEST_BULLET, 100, p); … … 156 155 void TestGun::fire() 157 156 { 158 Projectile* pj = new TestBullet( this);//dynamic_cast<Projectile*>(ObjectManager::getInstance()->getFromDeadList(CL_TEST_BULLET & CL_MASK_LOWLEVEL_CLASS));157 Projectile* pj = new TestBullet();//dynamic_cast<Projectile*>(ObjectManager::getInstance()->getFromDeadList(CL_TEST_BULLET & CL_MASK_LOWLEVEL_CLASS)); 159 158 // weaponSource->play(); 160 159
Note: See TracChangeset
for help on using the changeset viewer.