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