Shield Class Reference

#include <Shield.h>

Inheritance diagram for Shield:

AccessoryPart ShieldRound ShieldSquare ShieldRoundMag ShieldRoundReflective ShieldSquareReflective

List of all members.

Public Types

enum  ShieldType {
  ShieldTypeRoundNormal, ShieldTypeRoundReflective, ShieldTypeRoundMag,
  ShieldTypeSquareNormal, ShieldTypeSquareReflective
}
enum  ShieldMovementType {
  ShieldMovementAll, ShieldMovementNone, ShieldMovementSame,
  ShieldMovementTeam1, ShieldMovementTeam2, ShieldMovementTeam3,
  ShieldMovementTeam4
}
enum  ShieldLaserProofType { ShieldLaserProofNone, ShieldLaserProofStop, ShieldLaserProofTotal }

Public Member Functions

 Shield ()
virtual ~Shield ()
virtual bool parseXML (AccessoryCreateContext &context, XMLNode *accessoryNode)
const char * getCollisionSound ()
fixed getHitRemovePower ()
fixed getHitPenetration ()
fixed getPower ()
VectorgetColor ()
ShieldLaserProofType getLaserProof ()
ShieldMovementType getMovementProof ()
virtual fixed getBoundingSize ()=0
virtual bool inShield (FixedVector &offset)=0
virtual bool tankInShield (FixedVector &offset)=0
virtual ShieldType getShieldType ()=0
virtual bool getRound ()=0

Protected Attributes

std::string collisionSound_
Vector color_
fixed removePower_
fixed penetration_
fixed power_
ShieldLaserProofType laserProof_
ShieldMovementType movementProof_


Detailed Description

Definition at line 27 of file Shield.h.


Member Enumeration Documentation

enum Shield::ShieldType

Enumerator:
ShieldTypeRoundNormal 
ShieldTypeRoundReflective 
ShieldTypeRoundMag 
ShieldTypeSquareNormal 
ShieldTypeSquareReflective 

Definition at line 30 of file Shield.h.

enum Shield::ShieldMovementType

Enumerator:
ShieldMovementAll 
ShieldMovementNone 
ShieldMovementSame 
ShieldMovementTeam1 
ShieldMovementTeam2 
ShieldMovementTeam3 
ShieldMovementTeam4 

Definition at line 38 of file Shield.h.

enum Shield::ShieldLaserProofType

Enumerator:
ShieldLaserProofNone 
ShieldLaserProofStop 
ShieldLaserProofTotal 

Definition at line 48 of file Shield.h.


Constructor & Destructor Documentation

Shield::Shield (  ) 

Definition at line 26 of file Shield.cpp.

Shield::~Shield (  )  [virtual]

Definition at line 32 of file Shield.cpp.


Member Function Documentation

bool Shield::parseXML ( AccessoryCreateContext context,
XMLNode accessoryNode 
) [virtual]

Implements AccessoryPart.

Reimplemented in ShieldRound, ShieldRoundMag, ShieldRoundReflective, ShieldSquare, and ShieldSquareReflective.

Definition at line 36 of file Shield.cpp.

References S3D::checkDataFile(), collisionSound_, color_, S3D::formatStringBuffer(), getCollisionSound(), XMLNode::getNamedChild(), laserProof_, movementProof_, penetration_, power_, removePower_, XMLNode::returnError(), ShieldLaserProofNone, ShieldLaserProofStop, ShieldLaserProofTotal, ShieldMovementAll, ShieldMovementNone, ShieldMovementSame, ShieldMovementTeam1, ShieldMovementTeam2, ShieldMovementTeam3, ShieldMovementTeam4, and LangStringUtil::strcmp().

Referenced by ShieldSquare::parseXML(), and ShieldRound::parseXML().

const char * Shield::getCollisionSound (  ) 

Definition at line 93 of file Shield.cpp.

References collisionSound_.

Referenced by parseXML(), and ShieldHit::simulate().

fixed Shield::getHitRemovePower (  )  [inline]

Definition at line 63 of file Shield.h.

References removePower_.

Referenced by PhysicsParticleActionObject::shotShieldHit(), and ShieldHit::simulate().

fixed Shield::getHitPenetration (  )  [inline]

Definition at line 64 of file Shield.h.

References penetration_.

Referenced by TankDamage::calculateDamage().

fixed Shield::getPower (  )  [inline]

Definition at line 65 of file Shield.h.

References power_.

Referenced by TargetRendererImplTank::drawLife(), generateTargetTip(), and TargetShield::setCurrentShield().

Vector& Shield::getColor (  )  [inline]

Definition at line 66 of file Shield.h.

References color_.

Referenced by TargetRendererImpl::drawShield().

ShieldLaserProofType Shield::getLaserProof (  )  [inline]

Definition at line 67 of file Shield.h.

References laserProof_.

Referenced by Laser::simulate(), and TankAICurrentMoveWeapons::TankAICurrentMoveWeapons().

ShieldMovementType Shield::getMovementProof (  )  [inline]

Definition at line 68 of file Shield.h.

References movementProof_.

Referenced by MovementMap::movementProof().

virtual fixed Shield::getBoundingSize (  )  [pure virtual]

Implemented in ShieldRound, and ShieldSquare.

Referenced by TankAICurrentMove::lowestHighest(), and TargetShield::setCurrentShield().

virtual bool Shield::inShield ( FixedVector offset  )  [pure virtual]

Implemented in ShieldRound, and ShieldSquare.

Referenced by WeaponRoller::fireWeapon(), TargetSpace::getCollision(), PhysicsParticleObject::getShieldCollision(), MovementMap::inShield(), and Laser::simulate().

virtual bool Shield::tankInShield ( FixedVector offset  )  [pure virtual]

Implemented in ShieldRound, and ShieldSquare.

Referenced by PhysicsParticleObject::getShieldCollision().

virtual ShieldType Shield::getShieldType (  )  [pure virtual]

Implemented in ShieldRound, ShieldRoundMag, ShieldRoundReflective, ShieldSquare, and ShieldSquareReflective.

Referenced by PhysicsParticleActionObject::bounceShieldHit(), PhysicsParticleObject::checkShotCollision(), TargetRendererImpl::drawShield(), PhysicsParticleObject::getShieldCollision(), TankAICurrentMove::makeProjectileShot(), TankAICurrentMove::makeSniperShot(), and PhysicsParticleActionObject::shotShieldHit().

virtual bool Shield::getRound (  )  [pure virtual]

Implemented in ShieldRound, and ShieldSquare.

Referenced by TargetRendererImpl::drawShield(), and TargetSpace::getSquares().


Member Data Documentation

std::string Shield::collisionSound_ [protected]

Definition at line 77 of file Shield.h.

Referenced by getCollisionSound(), and parseXML().

Vector Shield::color_ [protected]

Definition at line 78 of file Shield.h.

Referenced by getColor(), and parseXML().

fixed Shield::removePower_ [protected]

Definition at line 79 of file Shield.h.

Referenced by getHitRemovePower(), and parseXML().

fixed Shield::penetration_ [protected]

Definition at line 80 of file Shield.h.

Referenced by getHitPenetration(), and parseXML().

fixed Shield::power_ [protected]

Definition at line 81 of file Shield.h.

Referenced by getPower(), and parseXML().

ShieldLaserProofType Shield::laserProof_ [protected]

Definition at line 82 of file Shield.h.

Referenced by getLaserProof(), and parseXML().

ShieldMovementType Shield::movementProof_ [protected]

Definition at line 83 of file Shield.h.

Referenced by getMovementProof(), and parseXML().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:06 2009 for Scorched3D by  doxygen 1.5.3