[859] | 1 | #ifndef _SpaceShip_H__ |
---|
| 2 | #define _SpaceShip_H__ |
---|
| 3 | |
---|
| 4 | #include <OgrePrerequisites.h> |
---|
| 5 | #include <OIS/OISMouse.h> |
---|
| 6 | |
---|
| 7 | #include "../OrxonoxPrereqs.h" |
---|
| 8 | |
---|
| 9 | #include "Model.h" |
---|
| 10 | #include "../tools/BillboardSet.h" |
---|
| 11 | |
---|
| 12 | class TiXmlElement; // Forward declaration |
---|
| 13 | |
---|
| 14 | namespace orxonox |
---|
| 15 | { |
---|
| 16 | class ParticleInterface; // Forward declaration |
---|
| 17 | |
---|
| 18 | class _OrxonoxExport SpaceShip : public Model, public OIS::MouseListener |
---|
| 19 | { |
---|
| 20 | public: |
---|
| 21 | SpaceShip(); |
---|
| 22 | ~SpaceShip(); |
---|
| 23 | void setConfigValues(); |
---|
| 24 | virtual void loadParams(TiXmlElement* xmlElem); |
---|
| 25 | virtual void tick(float dt); |
---|
| 26 | |
---|
| 27 | bool mouseMoved(const OIS::MouseEvent &e); |
---|
| 28 | bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
| 29 | bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id); |
---|
| 30 | |
---|
| 31 | |
---|
| 32 | private: |
---|
[862] | 33 | std::string projectileName_; |
---|
| 34 | |
---|
[859] | 35 | bool bInvertYAxis_; |
---|
| 36 | bool setMouseEventCallback_; |
---|
| 37 | bool bLMousePressed_; |
---|
| 38 | bool bRMousePressed_; |
---|
| 39 | |
---|
| 40 | Ogre::SceneNode* camNode_; |
---|
| 41 | |
---|
| 42 | ParticleInterface* tt_; |
---|
| 43 | |
---|
| 44 | BillboardSet redBillboard_; |
---|
| 45 | BillboardSet greenBillboard_; |
---|
| 46 | Ogre::SceneNode* redNode_; |
---|
| 47 | Ogre::SceneNode* greenNode_; |
---|
| 48 | float blinkTime_; |
---|
| 49 | |
---|
| 50 | BillboardSet crosshairNear_; |
---|
| 51 | BillboardSet crosshairFar_; |
---|
| 52 | Ogre::SceneNode* chNearNode_; |
---|
| 53 | Ogre::SceneNode* chFarNode_; |
---|
| 54 | |
---|
| 55 | float timeToReload_; |
---|
| 56 | float reloadTime_; |
---|
| 57 | |
---|
| 58 | float maxSideAndBackSpeed_; |
---|
| 59 | float maxSpeed_; |
---|
| 60 | float maxRotation_; |
---|
| 61 | float translationAcceleration_; |
---|
| 62 | float rotationAcceleration_; |
---|
| 63 | float translationDamping_; |
---|
| 64 | float rotationDamping_; |
---|
| 65 | |
---|
| 66 | Radian maxRotationRadian_; |
---|
| 67 | Radian rotationAccelerationRadian_; |
---|
| 68 | Radian rotationDampingRadian_; |
---|
| 69 | Radian zeroRadian_; |
---|
| 70 | Radian mouseXRotation_; |
---|
| 71 | Radian mouseYRotation_; |
---|
| 72 | |
---|
| 73 | float mouseX_; |
---|
| 74 | float mouseY_; |
---|
| 75 | |
---|
| 76 | int emitterRate_; |
---|
| 77 | }; |
---|
| 78 | ExportClass(SpaceShip, Orxonox); |
---|
| 79 | } |
---|
| 80 | |
---|
| 81 | #endif /* _SpaceShip_H__ */ |
---|