| 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 | |
|---|
| 9 | class 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 | float acceleration; |
|---|
| 29 | float maxSpeed; |
|---|
| 30 | float speed; |
|---|
| 31 | |
|---|
| 32 | Quaternion myDir; |
|---|
| 33 | Vector myCoor; |
|---|
| 34 | |
|---|
| 35 | bool bFire; |
|---|
| 36 | |
|---|
| 37 | Vector escapePoint; |
|---|
| 38 | bool onEscape; |
|---|
| 39 | |
|---|
| 40 | void attackPlayer( ActionBox* box, float dt ); |
|---|
| 41 | void moveTowardsBox( ActionBox* box, float dt ); |
|---|
| 42 | void moveTowards( Vector targetPos, Vector targetDir, float dt ); |
|---|
| 43 | }; |
|---|
| 44 | |
|---|
| 45 | #endif |
|---|
Note: See
TracBrowser
for help on using the repository browser.