Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10376 in orxonox.OLD for trunk/src/world_entities/npcs/npc.h


Ignore:
Timestamp:
Jan 26, 2007, 12:17:26 AM (17 years ago)
Author:
patrick
Message:

merged branche ai to trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npcs/npc.h

    r9869 r10376  
    44
    55#include "world_entity.h"
     6#include "ai_module.h"
     7#include "world_entities/weapons/weapon_manager.h"
    68
    79class AI;
    810
    9 class NPC : public WorldEntity {
     11class NPC : public WorldEntity
     12{
    1013  ObjectListDeclaration(NPC);
    11  public:
    12    NPC (const TiXmlElement* root);
     14
     15public:
     16  NPC(const TiXmlElement* root = NULL);
    1317  virtual ~NPC ();
    1418
    15   virtual void loadParams(const TiXmlElement* root = NULL);
     19  virtual void loadParams(const TiXmlElement* root);
    1620
    17   void addAI(AI* ai);
    1821
     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; }
    1940
    2041 private:
    2142
     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;
    2253};
    2354
Note: See TracChangeset for help on using the changeset viewer.