Changeset 9960 in orxonox.OLD for branches/playability/src
- Timestamp:
- Nov 26, 2006, 1:29:09 PM (18 years ago)
- Location:
- branches/playability/src/world_entities/projectiles
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/projectiles/projectile.cc
r9959 r9960 44 44 this->setDamage(1.0f); // default damage of a projectile set to 100.0 damage points 45 45 46 this->physDamage = 0.0f; 47 this->elecDamage = 0.0f; 46 48 //this->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT); 47 49 } … … 58 60 */ 59 61 //delete this->projectileModel; 62 } 63 64 Projectile::Projectile (float pDamage, float eDamage, PNode* target) : WorldEntity() 65 { 66 this->registerObject(this, Projectile::_objectList); 67 68 this->lifeCycle = 0.0; 69 this->lifeSpan = 1.0f; /* sec */ 70 this->removeNode(); 71 72 /* character attributes */ 73 this->setHealth(1.0f); 74 this->setDamage(1.0f); // default damage of a projectile set to 100.0 damage points 75 76 this->physDamage = pDamage; 77 this->elecDamage = eDamage; 78 this->target = target; 79 80 //this->addNodeFlags(PNODE_PROHIBIT_DELETE_WITH_PARENT); 81 } 82 83 void Projectile::initialize(float pDamage, float eDamage, PNode* target) 84 { 85 /* character attributes*/ 86 this->physDamage = pDamage; 87 this->elecDamage = eDamage; 88 this->target = target; 60 89 } 61 90 -
branches/playability/src/world_entities/projectiles/projectile.h
r9959 r9960 23 23 Projectile (); 24 24 virtual ~Projectile (); 25 26 /** @brief Constructor with variable passing*/ 27 Projectile (float pDamage, float eDamage, PNode* target); 28 /** @brief for void construction; setting values later - needed for FastFactory*/ 29 virtual void initialize(float pDamage, float eDamage, PNode* target); 25 30 26 31 void setFlightDirection(const Quaternion& flightDirection); … … 54 59 inline bool tickLifeCycle(float dt ) { this->lifeCycle += dt/this->lifeSpan; return(unlikely(this->lifeCycle >= 1)); } 55 60 56 inline int getPhysDamage() { return this->physDamage; };57 inline int getElecDamage() { return this->elecDamage; };61 inline float getPhysDamage() { return this->physDamage; }; 62 inline float getElecDamage() { return this->elecDamage; }; 58 63 59 64 protected:
Note: See TracChangeset
for help on using the changeset viewer.