Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 10442 was 10376, checked in by patrick, 18 years ago

merged branche ai to trunk

File size: 1.3 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  bool addWeapon(Weapon* weapon, int configID = -1, int slotID = -1);
23  void removeWeapon(Weapon* weapon);
24  void nextWeaponConfig();
25  void previousWeaponConfig();
26  inline WeaponManager& getWeaponManager() { return this->weaponMan; };
27
28
29  virtual void tick(float dt);
30  inline int getTeam()  { return teamNumber; }
31  inline void fire(){ this->bFire=true;}
32
33
34
35private:
36  inline void setTeamNumber(int number) { teamNumber=number; }
37  inline void setSwarmNumber(int number) { swarmNumber=number; }
38  inline void setMaxSpeed(float number) { maxSpeed=number; }
39  inline void setAttackDistance(float number) { attackDistance=number; }
40
41 private:
42
43  int                   teamNumber;   //!< number of the team
44  int                   swarmNumber;  //!< number of the swarm
45  int                   difficulty;   //!< difficulty
46  float                                         maxSpeed;
47  float                                         attackDistance;
48
49  WeaponManager         weaponMan;    //!< weapon manager
50  bool                  bFire;        //!< fire
51
52  AIModule*             aiModule;
53};
54
55#endif /* _NPC_H */
Note: See TracBrowser for help on using the repository browser.