Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/presentation/src/world_entities/npcs/actionbox_enemy.h @ 10725

Last change on this file since 10725 was 10725, checked in by rennerc, 17 years ago

actionboxenemy

File size: 1.3 KB
Line 
1
2#ifndef _NPC_H
3#define _NPC_H
4
5#include "world_entity.h"
6#include "world_entities/weapons/weapon_manager.h"
7#include "track/action_box.h"
8
9class ActionboxEnemy : public WorldEntity
10{
11  ObjectListDeclaration(ActionboxEnemy);
12
13  public:
14    ActionboxEnemy(const TiXmlElement* root = NULL);
15    virtual ~ActionboxEnemy ();
16 
17    virtual void tick(float dt);
18    virtual void draw() const;
19
20    virtual void loadParams(const TiXmlElement* root);
21   
22    virtual void destroy( WorldEntity* killer );
23   
24  private:
25    bool  isActive;
26    float pitch;      // rotate angle around x-axix
27    float dPitch;     // change pitch += dPitch*dt
28    Quaternion qPitch;
29   
30    float acceleration;
31    float maxSpeed;
32    float speed;
33   
34    Quaternion myDir;
35    Vector     myCoor;
36   
37    bool       bFire;
38   
39    Vector     escapePoint;
40    bool       onEscape;
41    bool       escaped;
42    Vector     endPoint;
43   
44    void setEndPoint( float x, float y, float z ){ endPoint = Vector(x, y, z); }
45   
46    void attackPlayer( ActionBox* box, float dt );
47    void moveTowardsBox( ActionBox* box, float dt );
48    void moveTowards( Vector targetPos, Vector targetDir, float dt );
49   
50    WeaponManager         weaponMan;      //!< the weapon manager: managing a list of energy weapons to wepaon-slot mapping
51};
52
53#endif
Note: See TracBrowser for help on using the repository browser.