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