Line | |
---|
1 | /*! |
---|
2 | * @file aiming_system.h |
---|
3 | * Definition of |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _AIMING_SYSTEM_H |
---|
7 | #define _AIMING_SYSTEM_H |
---|
8 | |
---|
9 | |
---|
10 | #include "world_entity.h" |
---|
11 | |
---|
12 | |
---|
13 | |
---|
14 | // FORWARD DECLARATION |
---|
15 | class TiXmlElement; |
---|
16 | class BVTree; |
---|
17 | class Model; |
---|
18 | class OBBTree; |
---|
19 | |
---|
20 | |
---|
21 | class AimingSystem : public WorldEntity |
---|
22 | { |
---|
23 | |
---|
24 | public: |
---|
25 | AimingSystem(WorldEntity* owner = NULL); |
---|
26 | virtual ~AimingSystem(); |
---|
27 | |
---|
28 | void init(); |
---|
29 | |
---|
30 | WorldEntity* getNearestTarget(); |
---|
31 | void flushList() { this->selectionList.clear(); } |
---|
32 | |
---|
33 | void setRange(float range){this->range = range;}; |
---|
34 | |
---|
35 | virtual void hit(float damage, WorldEntity* killer); |
---|
36 | virtual void destroy(WorldEntity* entity) {} |
---|
37 | |
---|
38 | virtual void tick(float dt); |
---|
39 | virtual void draw() const; |
---|
40 | |
---|
41 | |
---|
42 | private: |
---|
43 | float range; //!< |
---|
44 | float sideLength; |
---|
45 | std::vector<WorldEntity*> selectionList; //!< the selections |
---|
46 | |
---|
47 | WorldEntity* owner; //!< the owner of the targeting system |
---|
48 | |
---|
49 | OBBTree* obbTree; |
---|
50 | |
---|
51 | }; |
---|
52 | |
---|
53 | #endif /* _AIMING_SYSTEM_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.