Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/vs-enhencements/src/world_entities/npcs/actionbox_enemy.h @ 10656

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

ActionboxEnemy does not rotate around its z-axix more than ±pi/2-epsilon

File size: 775 bytes
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  private:
23    bool  isActive;
24    float pitch;      // rotate angle around x-axix
25    float dPitch;     // change pitch += dPitch*dt
26    Quaternion qPitch;
27   
28    Quaternion myDir;
29    Vector     myCoor;
30   
31    void attackPlayer( ActionBox* box, float dt );
32    void moveTowardsBox( ActionBox* box, float dt );
33};
34
35#endif
Note: See TracBrowser for help on using the repository browser.