Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/world_entities/npcs/adm_turret.h

Last change on this file was 10698, checked in by snellen, 17 years ago

merged adm, hud, vs-enhancements : beni's responsible for this commit. blame him!

File size: 1.8 KB
RevLine 
[10663]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
[10664]12#include "world_entity.h"
[10689]13#include "weapons/bsp_weapon.h"
[10663]14
[10664]15class AdmTurret : public WorldEntity
[10663]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:
[10677]36                   WorldEntity* cannons;
37                   WorldEntity* sensor;
[10663]38                   WorldEntity* myTarget;
[10677]39
40                   void addCannons(const TiXmlElement* root);
41                   void addSensor(const TiXmlElement* root);
[10694]42                   void addWeapon(const TiXmlElement* root);
[10677]43
44                   void moveTowards( Vector targetDir, float dt );
[10681]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 );
[10688]54                   
55                   bool playerVisible;
56                   void updatePlayerVisible();
[10689]57
58                BspWeapon* weapon;
[10664]59      };
60
61#endif
[10694]62
Note: See TracBrowser for help on using the repository browser.