34 #ifndef _BasicProjectile_H__ 35 #define _BasicProjectile_H__ 66 {
if(damage >= 0.0f) { this->damage_ = damage;
return; }
orxout(
internal_warning) <<
"The input projectile damage must be non-negative. Ignoring..." << endl; }
73 {
return this->damage_; }
81 {
if(healthdamage >= 0.0f) { this->healthdamage_ = healthdamage;
return; }
orxout(
internal_warning) <<
"The input projectile health-damage must be non-negative. Ignoring..." << endl; }
88 {
return this->healthdamage_; }
96 {
if(shielddamage >= 0.0f) { this->shielddamage_ = shielddamage;
return; }
orxout(
internal_warning) <<
"The input projectile shield-damage must be non-negative. Ignoring..." << endl; }
101 {
return this->shielddamage_; }
108 { this->shooter_ = shooter; }
114 {
return this->shooter_; }
116 virtual void destroyObject(
void);
119 bool processCollision(
WorldEntity* otherObject, btManifoldPoint& contactPoint,
const btCollisionShape* cs);
120 void destroyCheck(
void);
122 { destroyAfterCollision_ = destroyAfterCollision; }
124 {
return destroyAfterCollision_; }
127 bool isObjectRelatedToShooter(
WorldEntity* otherObject);
float getShieldDamage() const
Get the shield-damage done by this projectile.
Definition: BasicProjectile.h:100
Everything in Orxonox that has a health attribute is a Pawn.
Definition: Pawn.h:56
float getHealthDamage() const
Get the health-damage done by this projectile.
Definition: BasicProjectile.h:87
virtual void setShooter(Pawn *shooter)
Set the entity that fired the projectile.
Definition: BasicProjectile.h:107
Shared library macros, enums, constants and forward declarations for the weapons module ...
float damage_
The amount of normal damage. Normal damage can be (partially) absorbed by shields.
Definition: BasicProjectile.h:131
Output level, used for warnings which are important for developers.
Definition: OutputDefinitions.h:96
WeakPtr< Pawn > shooter_
The entity that fired the projectile.
Definition: BasicProjectile.h:129
This is the class from which all interfaces of the game-logic (not the engine) are derived from...
Definition: OrxonoxInterface.h:50
WeakPtr wraps a pointer to an object, which becomes nullptr if the object is deleted.
Definition: CorePrereqs.h:236
The WorldEntity represents everything that can be put in a Scene at a certain location.
Definition: WorldEntity.h:72
void setHealthDamage(float healthdamage)
Set the health-damage done by this projectile.
Definition: BasicProjectile.h:80
Pawn * getShooter(void)
Get the entity that fired the projectile.
Definition: BasicProjectile.h:113
OutputStream & orxout(OutputLevel level=level::debug_output, const OutputContextContainer &context=context::undefined())
This helper function returns a reference to a commonly used instance of OutputStream.
Definition: Output.h:81
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
bool bDestroy_
Boolean, to check whether a projectile should be destroyed.
Definition: BasicProjectile.h:135
Declaration of OrxonoxInterface, the base class of all interfaces in Orxonox.
float getDamage() const
Get the normal damage done by this projectile.
Definition: BasicProjectile.h:72
void setDestroyAfterCollision(bool destroyAfterCollision)
Definition: BasicProjectile.h:121
void setShieldDamage(float shielddamage)
Set the shield-damage done by this projectile.
Definition: BasicProjectile.h:95
bool destroyAfterCollision_
Boolean, defines whether the projectile gets detroyed after a collision.
Definition: BasicProjectile.h:136
Baseclass of all projectiles.
Definition: BasicProjectile.h:54
bool getDestroyAfterCollision() const
Definition: BasicProjectile.h:123
void setDamage(float damage)
Set the normal damage done by this projectile.
Definition: BasicProjectile.h:65
float shielddamage_
The amount of shield-damage. Shield-damage only reduces shield health.
Definition: BasicProjectile.h:133
#define _WeaponsExport
Definition: WeaponsPrereqs.h:60
float healthdamage_
The amount of health-damage. Health-damage cannot be absorbed by shields.
Definition: BasicProjectile.h:132