19 #ifndef OPENXCOM_PROJECTILE_H
20 #define OPENXCOM_PROJECTILE_H
24 #include "BattlescapeGame.h"
31 class SavedBattleGame;
46 std::vector<Position> _trajectory;
50 void applyAccuracy(
const Position& origin,
Position *target,
double accuracy,
bool keepRange,
Tile *targetTile,
bool extendLine);
Definition: BattlescapeGame.h:45
void skipTrajectory()
Skips the bullet flight.
Definition: Projectile.cpp:399
A class that represents a projectile.
Definition: Projectile.h:39
Projectile(ResourcePack *res, SavedBattleGame *save, BattleAction action, Position origin, Position target)
Creates a new Projectile.
Definition: Projectile.cpp:52
Position getTarget()
Gets the targetted tile for the projectile.
Definition: Projectile.cpp:421
int calculateThrow(double accuracy)
Calculates the trajectory for a curved path.
Definition: Projectile.cpp:184
int calculateTrajectory(double accuracy)
Calculates the trajectory for a straight path.
Definition: Projectile.cpp:91
bool move()
Moves the projectile one step in its trajectory.
Definition: Projectile.cpp:331
Represents a single item in the battlescape.
Definition: BattleItem.h:39
BattleItem * getItem() const
Gets the item.
Definition: Projectile.cpp:379
~Projectile()
Cleans up the Projectile.
Definition: Projectile.cpp:80
Position getOrigin()
Gets the Position of origin for the projectile.
Definition: Projectile.cpp:408
Position getPosition(int offset=0) const
Gets the current position in voxel space.
Definition: Projectile.cpp:350
Basic element of which a battle map is build.
Definition: Tile.h:43
Element that is blit (rendered) onto the screen.
Definition: Surface.h:39
Packs of external game media.
Definition: ResourcePack.h:50
int getParticle(int i) const
Gets a particle from the particle array.
Definition: Projectile.cpp:364
Surface * getSprite() const
Gets the sprite.
Definition: Projectile.cpp:391
The battlescape data that gets written to disk when the game is saved.
Definition: SavedBattleGame.h:50
Easy handling of X-Y-Z coordinates.
Definition: Position.h:30