Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/blink/src/world_entities/npcs/npc.h @ 10770

Last change on this file since 10770 was 10447, checked in by snellen, 18 years ago

debugdraw track in npc

File size: 1.6 KB
Line 
1
2#ifndef _NPC_H
3#define _NPC_H
4
5#include "world_entity.h"
6#include "ai_module.h"
7#include "world_entities/weapons/weapon_manager.h"
8
9class AI;
10
11class NPC : public WorldEntity
12{
13  ObjectListDeclaration(NPC);
14
15public:
16  NPC(const TiXmlElement* root = NULL);
17  virtual ~NPC ();
18
19  virtual void loadParams(const TiXmlElement* root);
20
21
22  void addWeapons(const TiXmlElement* root);
23  bool addWeapon(Weapon* weapon, int configID = -1, int slotID = -1);
24  void removeWeapon(Weapon* weapon);
25  void nextWeaponConfig();
26  void previousWeaponConfig();
27  inline WeaponManager& getWeaponManager() { return this->weaponMan; };
28
29
30  virtual void tick(float dt);
31  void draw() const;
32  inline int getTeam()  { return teamNumber; }
33  inline void fire(){ this->bFire=true;}
34
35  inline void enableAI() { this->bAIEnabled = true; }
36
37private:
38  inline void setTeamNumber(int number) { teamNumber=number; }
39  inline void setSwarmNumber(int number) { swarmNumber=number; }
40  inline void setMaxSpeed(float number) { maxSpeed=number; }
41  inline void setAttackDistance(float number) { attackDistance=number; }
42
43 private:
44
45  int                   teamNumber;   //!< number of the team
46  int                   swarmNumber;  //!< number of the swarm
47  int                   difficulty;   //!< difficulty
48  float                                         maxSpeed;
49  float                                         attackDistance;
50
51  WeaponManager         weaponMan;    //!< weapon manager
52  bool                  bFire;        //!< fire
53
54  AIModule*             aiModule;
55
56  bool                  bAIEnabled;   //!< true is AI enabled
57};
58
59#endif /* _NPC_H */
Note: See TracBrowser for help on using the repository browser.