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