[1505] | 1 | #ifndef _Fighter_H__ |
---|
| 2 | #define _Fighter_H__ |
---|
| 3 | |
---|
| 4 | #include <OIS/OIS.h> |
---|
| 5 | |
---|
| 6 | #include "../OrxonoxPrereqs.h" |
---|
| 7 | |
---|
| 8 | #include "Model.h" |
---|
| 9 | |
---|
| 10 | namespace orxonox |
---|
| 11 | { |
---|
| 12 | class _OrxonoxExport Fighter : public Model, public OIS::MouseListener |
---|
| 13 | { |
---|
| 14 | public: |
---|
| 15 | Fighter(); |
---|
| 16 | ~Fighter(); |
---|
| 17 | void setConfigValues(); |
---|
| 18 | virtual void loadParams(TiXmlElement* xmlElem); |
---|
| 19 | void setMaxSpeedValues(float maxSpeedForward, float maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft); |
---|
| 20 | virtual void tick(float dt); |
---|
| 21 | void moveForward(float moveForward); |
---|
| 22 | void rotateUp(float rotateUp); |
---|
| 23 | void rotateDown(float rotateDown); |
---|
| 24 | void rotateRight(float rotateRight); |
---|
| 25 | void rotateLeft(float rotateLeft); |
---|
| 26 | void loopRight(float loopRight); |
---|
| 27 | void loopLeft(float loopLeft); |
---|
| 28 | void brakeForward(float brakeForward); |
---|
| 29 | void brakeRotate(float brakeRotate); |
---|
| 30 | void brakeLoop(float brakeLoop); |
---|
| 31 | void maxSpeedForward(float maxSpeedForward); |
---|
| 32 | void maxSpeedRotateUpDown(float maxSpeedRotateUpDown); |
---|
| 33 | void maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft); |
---|
| 34 | void maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft); |
---|
| 35 | bool mouseMoved(const OIS::MouseEvent &e); |
---|
| 36 | bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);// { return true; } |
---|
| 37 | bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);// { return true; } |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | private: |
---|
| 41 | bool bInvertMouse_; |
---|
| 42 | bool setMouseEventCallback_; |
---|
| 43 | |
---|
| 44 | ParticleInterface *w; |
---|
| 45 | ParticleInterface *tt; |
---|
| 46 | |
---|
| 47 | AmmunitionDump* ammoDump_; |
---|
| 48 | BarrelGun* mainWeapon_; |
---|
| 49 | |
---|
| 50 | bool leftButtonPressed_; |
---|
| 51 | bool rightButtonPressed_; |
---|
| 52 | |
---|
| 53 | float moveForward_; |
---|
| 54 | float rotateUp_; |
---|
| 55 | float rotateDown_; |
---|
| 56 | float rotateRight_; |
---|
| 57 | float rotateLeft_; |
---|
| 58 | float loopRight_; |
---|
| 59 | float loopLeft_; |
---|
| 60 | float brakeForward_; |
---|
| 61 | float brakeRotate_; |
---|
| 62 | float brakeLoop_; |
---|
| 63 | |
---|
| 64 | float speedForward_; |
---|
| 65 | float speedRotateUpDown_; |
---|
| 66 | float speedRotateRightLeft_; |
---|
| 67 | float speedLoopRightLeft_; |
---|
| 68 | |
---|
| 69 | float maxSpeedForward_; |
---|
| 70 | float maxSpeedRotateUpDown_; |
---|
| 71 | float maxSpeedRotateRightLeft_; |
---|
| 72 | float maxSpeedLoopRightLeft_; |
---|
| 73 | |
---|
| 74 | float accelerationForward_; |
---|
| 75 | float accelerationRotateUpDown_; |
---|
| 76 | float accelerationRotateRightLeft_; |
---|
| 77 | float accelerationLoopRightLeft_; |
---|
| 78 | |
---|
| 79 | float speed; |
---|
| 80 | float rotate; |
---|
| 81 | float loop; |
---|
| 82 | float mouseY; |
---|
| 83 | float mouseX; |
---|
| 84 | float maxMouseX; |
---|
| 85 | float minMouseX; |
---|
| 86 | bool moved; |
---|
| 87 | |
---|
| 88 | int emitterRate_; |
---|
| 89 | }; |
---|
| 90 | } |
---|
| 91 | |
---|
| 92 | #endif /* _Fighter_H__ */ |
---|