00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #if !defined(AFX_SHIELD_H__F9BCDF39_FB62_4BB4_9D64_C70215669F9C__INCLUDED_)
00022 #define AFX_SHIELD_H__F9BCDF39_FB62_4BB4_9D64_C70215669F9C__INCLUDED_
00023
00024 #include <weapons/AccessoryPart.h>
00025 #include <common/Vector.h>
00026
00027 class Shield : public AccessoryPart
00028 {
00029 public:
00030 enum ShieldType
00031 {
00032 ShieldTypeRoundNormal,
00033 ShieldTypeRoundReflective,
00034 ShieldTypeRoundMag,
00035 ShieldTypeSquareNormal,
00036 ShieldTypeSquareReflective
00037 };
00038 enum ShieldMovementType
00039 {
00040 ShieldMovementAll,
00041 ShieldMovementNone,
00042 ShieldMovementSame,
00043 ShieldMovementTeam1,
00044 ShieldMovementTeam2,
00045 ShieldMovementTeam3,
00046 ShieldMovementTeam4
00047 };
00048 enum ShieldLaserProofType
00049 {
00050 ShieldLaserProofNone,
00051 ShieldLaserProofStop,
00052 ShieldLaserProofTotal
00053 };
00054
00055 Shield();
00056 virtual ~Shield();
00057
00058 virtual bool parseXML(AccessoryCreateContext &context,
00059 XMLNode *accessoryNode);
00060
00061
00062 const char *getCollisionSound();
00063 fixed getHitRemovePower() { return removePower_; }
00064 fixed getHitPenetration() { return penetration_; }
00065 fixed getPower() { return power_; }
00066 Vector &getColor() { return color_; }
00067 ShieldLaserProofType getLaserProof() { return laserProof_; }
00068 ShieldMovementType getMovementProof() { return movementProof_; }
00069
00070 virtual fixed getBoundingSize() = 0;
00071 virtual bool inShield(FixedVector &offset) = 0;
00072 virtual bool tankInShield(FixedVector &offset) = 0;
00073 virtual ShieldType getShieldType() = 0;
00074 virtual bool getRound() = 0;
00075
00076 protected:
00077 std::string collisionSound_;
00078 Vector color_;
00079 fixed removePower_;
00080 fixed penetration_;
00081 fixed power_;
00082 ShieldLaserProofType laserProof_;
00083 ShieldMovementType movementProof_;
00084 };
00085
00086 #endif // !defined(AFX_SHIELD_H__F9BCDF39_FB62_4BB4_9D64_C70215669F9C__INCLUDED_)