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 | void setConfigValues(); |
---|
21 | virtual void loadParams(TiXmlElement* xmlElem); |
---|
22 | void setMaxSpeedValues(float maxSpeedForward, float maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft); |
---|
23 | virtual void tick(float dt); |
---|
24 | void moveForward(float moveForward); |
---|
25 | void rotateUp(float rotateUp); |
---|
26 | void rotateDown(float rotateDown); |
---|
27 | void rotateRight(float rotateRight); |
---|
28 | void rotateLeft(float rotateLeft); |
---|
29 | void loopRight(float loopRight); |
---|
30 | void loopLeft(float loopLeft); |
---|
31 | void brakeForward(float brakeForward); |
---|
32 | void brakeRotate(float brakeRotate); |
---|
33 | void brakeLoop(float brakeLoop); |
---|
34 | void maxSpeedForward(float maxSpeedForward); |
---|
35 | void maxSpeedRotateUpDown(float maxSpeedRotateUpDown); |
---|
36 | void maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft); |
---|
37 | void maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft); |
---|
38 | bool mouseMoved(const OIS::MouseEvent &e); |
---|
39 | bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);// { return true; } |
---|
40 | bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);// { return true; } |
---|
41 | |
---|
42 | |
---|
43 | private: |
---|
44 | bool bInvertMouse_; |
---|
45 | bool setMouseEventCallback_; |
---|
46 | |
---|
47 | particle::ParticleInterface *w; |
---|
48 | particle::ParticleInterface *tt; |
---|
49 | |
---|
50 | AmmunitionDump* ammoDump_; |
---|
51 | BarrelGun* mainWeapon_; |
---|
52 | |
---|
53 | bool leftButtonPressed_; |
---|
54 | bool rightButtonPressed_; |
---|
55 | |
---|
56 | float moveForward_; |
---|
57 | float rotateUp_; |
---|
58 | float rotateDown_; |
---|
59 | float rotateRight_; |
---|
60 | float rotateLeft_; |
---|
61 | float loopRight_; |
---|
62 | float loopLeft_; |
---|
63 | float brakeForward_; |
---|
64 | float brakeRotate_; |
---|
65 | float brakeLoop_; |
---|
66 | |
---|
67 | float speedForward_; |
---|
68 | float speedRotateUpDown_; |
---|
69 | float speedRotateRightLeft_; |
---|
70 | float speedLoopRightLeft_; |
---|
71 | |
---|
72 | float maxSpeedForward_; |
---|
73 | float maxSpeedRotateUpDown_; |
---|
74 | float maxSpeedRotateRightLeft_; |
---|
75 | float maxSpeedLoopRightLeft_; |
---|
76 | |
---|
77 | float accelerationForward_; |
---|
78 | float accelerationRotateUpDown_; |
---|
79 | float accelerationRotateRightLeft_; |
---|
80 | float accelerationLoopRightLeft_; |
---|
81 | |
---|
82 | float speed; |
---|
83 | float rotate; |
---|
84 | float loop; |
---|
85 | float mouseY; |
---|
86 | float mouseX; |
---|
87 | float maxMouseX; |
---|
88 | float minMouseX; |
---|
89 | bool moved; |
---|
90 | |
---|
91 | int emitterRate_; |
---|
92 | }; |
---|
93 | } |
---|
94 | |
---|
95 | #endif /* _Fighter_H__ */ |
---|