Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/weapons/aiming_system.h @ 10220

Last change on this file since 10220 was 9869, checked in by bensch, 18 years ago

orxonox/trunk: merged the new_class_id branche back to the trunk.
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/new_class_id trunk -r9683:HEAD
no conflicts… puh..

File size: 1.0 KB
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
15class TiXmlElement;
16class BVTree;
17class Model;
18class OBBTree;
19
20
21class AimingSystem : public WorldEntity
22{
23  ObjectListDeclaration(AimingSystem);
24
25 public:
26  AimingSystem(WorldEntity* owner = NULL);
27  virtual ~AimingSystem();
28
29  void init();
30
31  WorldEntity* getNearestTarget();
32  void flushList() { this->selectionList.clear(); }
33
34  void setRange(float range){this->range = range;};
35
36  virtual void hit(float damage, WorldEntity* killer);
37  virtual void destroy(WorldEntity* entity) {}
38
39  virtual void tick(float dt);
40  virtual void draw() const;
41
42
43 private:
44   float                       range;                //!<
45   float                       sideLength;
46   std::vector<WorldEntity*>   selectionList;        //!< the selections
47
48   WorldEntity*                owner;                //!< the owner of the targeting system
49
50   OBBTree*                    obbTree;
51
52};
53
54#endif /* _AIMING_SYSTEM_H */
Note: See TracBrowser for help on using the repository browser.