Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/adm/src/world_entities/npcs/adm_turret.h @ 10663

Last change on this file since 10663 was 10663, checked in by retolu, 17 years ago

My work so far concerning Auto Defense Mechanism (Turret)

File size: 1.4 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 "weapon.h"
13
14class GroundTurret : public WorldEntity
15      {
16                   ObjectListDeclaration(AdmTurret);
17      public:
18                   AdmTurret ();
19                   AdmTurret (const  TiXmlElement* root);
20                   virtual ~AdmTurret();
21                   
22                   void init();
23                   void loadParams(const TiXmlElement* root);
24                   
25                   virtual void tick(float dt);
26                   virtual void draw() const;
27                   virtual void collidesWith(WorldEntity* entity, const Vector& location);
28                   
29                   virtual void activate();
30                   virtual void deactivate();
31                   
32                   virtual void setTarget(const std::string& target);
33                   
34      private:
35                   PNode cannonNode;
36                   PNode sensorNode;
37                   WorldEntity* myTarget;
38                   bool isVisible(const WorldEntity myTarget);
39                   float aim(const WorldEntity Target);
40                   void fire();
41                                           
42      }
Note: See TracBrowser for help on using the repository browser.