Last change
on this file since 10761 was
10698,
checked in by snellen, 18 years ago
|
merged adm, hud, vs-enhancements : beni's responsible for this commit. blame him!
|
File size:
1.8 KB
|
Line | |
---|
1 | /* |
---|
2 | * file groundTurret.h |
---|
3 | * A weapon that is fix located, and automatically shooting at a target. |
---|
4 | */ |
---|
5 | |
---|
6 | #ifndef _ADM_TURRET_H |
---|
7 | #define _ADM_TURRET_H |
---|
8 | |
---|
9 | //#include "sound_buffer.h" |
---|
10 | //#include "sound_source.h" |
---|
11 | |
---|
12 | #include "world_entity.h" |
---|
13 | #include "weapons/bsp_weapon.h" |
---|
14 | |
---|
15 | class AdmTurret : public WorldEntity |
---|
16 | { |
---|
17 | ObjectListDeclaration(AdmTurret); |
---|
18 | public: |
---|
19 | AdmTurret (); |
---|
20 | AdmTurret (const TiXmlElement* root); |
---|
21 | virtual ~AdmTurret(); |
---|
22 | |
---|
23 | void init(); |
---|
24 | void loadParams(const TiXmlElement* root); |
---|
25 | |
---|
26 | virtual void tick(float dt); |
---|
27 | virtual void draw() const; |
---|
28 | virtual void collidesWith(WorldEntity* entity, const Vector& location); |
---|
29 | |
---|
30 | virtual void activate(); |
---|
31 | virtual void deactivate(); |
---|
32 | |
---|
33 | virtual void setTarget(const std::string& target); |
---|
34 | |
---|
35 | private: |
---|
36 | WorldEntity* cannons; |
---|
37 | WorldEntity* sensor; |
---|
38 | WorldEntity* myTarget; |
---|
39 | |
---|
40 | void addCannons(const TiXmlElement* root); |
---|
41 | void addSensor(const TiXmlElement* root); |
---|
42 | void addWeapon(const TiXmlElement* root); |
---|
43 | |
---|
44 | void moveTowards( Vector targetDir, float dt ); |
---|
45 | |
---|
46 | float bodyAngle; |
---|
47 | float cannonAngle; |
---|
48 | |
---|
49 | bool isActive; |
---|
50 | float range; |
---|
51 | |
---|
52 | bool isCeil; |
---|
53 | void setType( const std::string& type ); |
---|
54 | |
---|
55 | bool playerVisible; |
---|
56 | void updatePlayerVisible(); |
---|
57 | |
---|
58 | BspWeapon* weapon; |
---|
59 | }; |
---|
60 | |
---|
61 | #endif |
---|
62 | |
---|
Note: See
TracBrowser
for help on using the repository browser.