19 #ifndef OPENXCOM_WEAPONPROJECTILE_H
20 #define OPENXCOM_WEAPONPROJECTILE_H
29 enum CraftWeaponProjectileType { CWPT_STINGRAY_MISSILE, CWPT_AVALANCHE_MISSILE, CWPT_CANNON_ROUND, CWPT_FUSION_BALL, CWPT_LASER_BEAM, CWPT_PLASMA_BEAM };
30 enum CraftWeaponProjectileGlobalType { CWPGT_MISSILE, CWPGT_BEAM };
31 enum Directions { D_NONE, D_UP, D_DOWN };
32 const int HP_LEFT = -1;
33 const int HP_CENTER = 0;
34 const int HP_RIGHT = 1;
39 CraftWeaponProjectileType _type;
40 CraftWeaponProjectileGlobalType _globalType;
44 int _horizontalPosition;
59 void setType(CraftWeaponProjectileType type);
61 CraftWeaponProjectileType
getType()
const;
void setDirection(const int &directon)
Sets projectile direction. This determines it's initial position.
Definition: CraftWeaponProjectile.cpp:73
void setHorizontalPosition(int position)
Sets horizontal position. This determines from which weapon projectile has been fired.
Definition: CraftWeaponProjectile.cpp:144
int getHorizontalPosition() const
Gets horizontal position.
Definition: CraftWeaponProjectile.cpp:152
int getDirection() const
Gets projectile direction.
Definition: CraftWeaponProjectile.cpp:85
void setMissed(const bool &missed)
Sets the projectile to missed status.
Definition: CraftWeaponProjectile.cpp:218
CraftWeaponProjectileType getType() const
Returns projectile type.
Definition: CraftWeaponProjectile.cpp:56
int getAccuracy() const
Gets accuracy of the projectile.
Definition: CraftWeaponProjectile.cpp:210
CraftWeaponProjectileGlobalType getGlobalType() const
Returns projectile global type.
Definition: CraftWeaponProjectile.cpp:65
void move()
Moves projectile in _direction with _speed.
Definition: CraftWeaponProjectile.cpp:94
int getPosition() const
Gets projectile position.
Definition: CraftWeaponProjectile.cpp:135
void setType(CraftWeaponProjectileType type)
Sets projectile type. This determines it's speed.
Definition: CraftWeaponProjectile.cpp:42
void setDamage(const int &damage)
Sets power of the projectile.
Definition: CraftWeaponProjectile.cpp:185
void setRange(const int &range)
Sets maximum range of projectile.
Definition: CraftWeaponProjectile.cpp:235
int getDamage() const
Gets power of the projectile.
Definition: CraftWeaponProjectile.cpp:194
void setAccuracy(const int &accuracy)
Sets accuracy of the projectile.
Definition: CraftWeaponProjectile.cpp:202
int getRange() const
Gets maximum range of projectile.
Definition: CraftWeaponProjectile.cpp:243
int getState() const
Returns state of the beam.
Definition: CraftWeaponProjectile.cpp:176
void setSpeed(const int speed)
Sets the speed of a missile type projectile.
Definition: CraftWeaponProjectile.cpp:251
void setPosition(const int &position)
Sets projectile position.
Definition: CraftWeaponProjectile.cpp:127
bool getMissed() const
Gets the projectile missed status.
Definition: CraftWeaponProjectile.cpp:227
bool toBeRemoved() const
Returns true if the projectile should be removed.
Definition: CraftWeaponProjectile.cpp:168
Definition: CraftWeaponProjectile.h:36