- Timestamp:
- May 25, 2011, 9:41:29 PM (13 years ago)
- Location:
- code/branches/presentation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation
- Property svn:mergeinfo changed
-
code/branches/presentation/src/orxonox/worldentities/pawns/Pawn.h
r8579 r8580 72 72 { return this->initialHealth_; } 73 73 74 inline void setShieldHealth(float shieldHealth)75 { this->shieldHealth_ = shieldHealth; } 74 virtual void setShieldHealth(float shieldHealth); 75 76 76 inline float getShieldHealth() 77 77 { return this->shieldHealth_; } 78 79 inline void addShieldHealth(float amount) 80 { this->setShieldHealth(this->shieldHealth_ + amount); } 81 82 inline bool hasShield() 83 { return (this->getShieldHealth() > 0); } 84 85 virtual void setMaxShieldHealth(float maxshieldhealth); 86 inline float getMaxShieldHealth() const 87 { return this->maxShieldHealth_; } 88 89 inline void setInitialShieldHealth(float initialshieldhealth) 90 { this->initialShieldHealth_ = initialshieldhealth; this->setShieldHealth(initialshieldhealth); } 91 inline float getInitialShieldHealth() const 92 { return this->initialShieldHealth_; } 93 94 inline void restoreInitialShieldHealth() 95 { this->setShieldHealth(this->initialShieldHealth_); } 96 inline void restoreMaxShieldHealth() 97 { this->setShieldHealth(this->maxShieldHealth_); } 78 98 79 99 inline void setShieldAbsorption(float shieldAbsorption) … … 82 102 { return this->shieldAbsorption_; } 83 103 104 // TODO: Rename to shieldRechargeRate 105 virtual void setReloadRate(float reloadrate); 106 inline float getReloadRate() const 107 { return this->reloadRate_; } 108 109 virtual void setReloadWaitTime(float reloadwaittime); 110 inline float getReloadWaitTime() const 111 { return this->reloadWaitTime_; } 112 113 inline void resetReloadCountdown() 114 { this->reloadWaitCountdown_ = 0; } 115 116 inline void startReloadCountdown() 117 { this->reloadWaitCountdown_ = this->getReloadWaitTime(); } // TODO: Implement in Projectile.cc 118 119 virtual void decreaseReloadCountdownTime(float dt); 120 84 121 inline ControllableEntity* getLastHitOriginator() const 85 122 { return this->lastHitOriginator_; } 86 123 87 virtual void hit(Pawn* originator, const Vector3& force, float damage); 88 virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage); 124 //virtual void hit(Pawn* originator, const Vector3& force, float damage); 125 //virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage); 126 virtual void hit(Pawn* originator, const Vector3& force, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f); 127 virtual void hit(Pawn* originator, btManifoldPoint& contactpoint, float damage, float healthdamage = 0.0f, float shielddamage = 0.0f); 128 89 129 virtual void kill(); 90 130 … … 142 182 virtual void spawneffect(); 143 183 144 virtual void damage(float damage, Pawn* originator = 0); 184 //virtual void damage(float damage, Pawn* originator = 0); 185 virtual void damage(float damage, float healthdamage = 0.0f, float shielddamage = 0.0f, Pawn* originator = NULL); 145 186 146 187 bool bAlive_; … … 154 195 float maxHealth_; 155 196 float initialHealth_; 197 156 198 float shieldHealth_; 199 float maxShieldHealth_; 200 float initialShieldHealth_; 157 201 float shieldAbsorption_; // Has to be between 0 and 1 202 float reloadRate_; 203 float reloadWaitTime_; 204 float reloadWaitCountdown_; 158 205 159 206 WeakPtr<Pawn> lastHitOriginator_;
Note: See TracChangeset
for help on using the changeset viewer.