-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProjectile.h
51 lines (44 loc) · 1.1 KB
/
Projectile.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef _PROJECTILE_H
#define _PROJECTILE_H
#include <Ogre.h>
#include <OgreApplicationContext.h>
#include <OgreInput.h>
#include <OgreRTShaderSystem.h>
#include <OgreCameraMan.h>
#include <OgreTrays.h>
#include <OgreAdvancedRenderControls.h>
#include <OgreConfigDialog.h>
class Unit;
class Building;
class Tile;
class Projectile
{
public:
Projectile(Ogre::Vector3 startingPosition, double damage, double missRate, Ogre::SceneManager* manager, double movementSpeed, int controllingPlayer, bool lockedOn=false, int id=-1);
~Projectile();
void update();
void setTarget(Unit* unit);
void setTarget(Building* building, Tile* tile);
void setPosition(Ogre::Vector3 position);
Ogre::Vector3 getPosition();
bool isDestroyed();
void setDestroyed(bool a);
int getID();
int getControllingPlayer();
void setVisible(bool a);
private:
Ogre::SceneNode* node;
Ogre::Entity* entity;
Ogre::SceneManager* sceneManager;
double damage;
double missRate;
double movementSpeed;
int id;
int controllingPlayer;
Unit* unitTarget;
Building* buildingTarget;
Tile* buildingTargetTile;
bool lockedOn;
bool destroyed;
};
#endif