Changeset 8706 for code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h
- Timestamp:
- Jun 14, 2011, 8:53:28 PM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h
r7801 r8706 59 59 60 60 virtual void fire(); 61 virtual void boost( );61 virtual void boost(bool bBoost); // Starts or stops boosting. 62 62 63 void setEngine(Engine* engine); 64 inline Engine* getEngine() const 65 { return this->engine_; } 63 void addEngine(Engine* engine); 64 bool hasEngine(Engine* engine); 65 Engine* getEngine(unsigned int i); // This one's for XMLPort 66 inline const std::vector<Engine*>& getEngineList() 67 { return this->engineList_; } 68 void removeEngine(Engine* engine); 69 void removeAllEngines(); 70 71 void setSpeedFactor(float factor); 72 float getSpeedFactor(); // Gets mean speed factor 73 float getMaxSpeedFront(); // gets largest speed forward 74 float getBoostFactor(); // gets mean boost factor 66 75 67 76 inline void setSteeringDirection(const Vector3& direction) … … 69 78 inline const Vector3& getSteeringDirection() const 70 79 { return this->steering_; } 80 inline void resetEngineTicks() 81 { this->engineTicksNotDone = this->engineList_.size(); } 82 inline void oneEngineTickDone() 83 { this->engineTicksNotDone--; } 84 inline bool hasEngineTicksRemaining() 85 { return (this->engineTicksNotDone>0); } 71 86 72 void setBoost(bool bBoost);73 87 inline bool getBoost() const 74 88 { return this->bBoost_; } 75 89 76 inline void setEngineTemplate(const std::string& temp)77 { this->enginetemplate_ = temp; this->loadEngineTemplate(); }78 inline const std::string& getEngineTemplate() const79 { return this-> enginetemplate_; }90 inline float getBoostPower() const 91 { return this->boostPower_; } 92 inline float getInitialBoostPower() const 93 { return this->initialBoostPower_; } 80 94 81 inline void setPermanentBoost(bool bPermanent) 82 { this->bPermanentBoost_ = bPermanent; } 83 inline bool getPermanentBoost() const 84 { return this->bPermanentBoost_; } 95 inline bool isBoostCoolingDown() const 96 { return bBoostCooldown_; } 85 97 86 98 protected: … … 90 102 bool bBoost_; 91 103 bool bBoostCooldown_; 92 bool bPermanentBoost_;93 104 float boostPower_; 94 105 float initialBoostPower_; … … 96 107 float boostPowerRate_; 97 108 float boostCooldownDuration_; 109 float lift_; 110 float stallSpeed_; 98 111 Vector3 steering_; 99 112 float primaryThrust_; … … 103 116 btVector3 localAngularAcceleration_; 104 117 118 float shakeFrequency_; 119 float shakeAmplitude_; 120 105 121 private: 106 122 void registerVariables(); 107 123 virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const; 124 125 //All things booster 126 void changedEnableMotionBlur(); 127 void boostCooledDown(void); 128 129 void resetCamera(); 130 void backupCamera(); 131 void shakeCamera(float dt); 108 132 109 void loadEngineTemplate();110 111 void boostCooledDown(void);133 Shader* boostBlur_; 134 float blurStrength_; 135 bool bEnableMotionBlur_; 112 136 113 std:: string enginetemplate_;114 Engine* engine_;137 std::vector<Engine*> engineList_; 138 int engineTicksNotDone; // Used for knowing when to reset temporary variables. 115 139 Timer timer_; 140 Vector3 cameraOriginalPosition_; 141 Quaternion cameraOriginalOrientation_; 142 143 float shakeDt_; 116 144 }; 117 145 }
Note: See TracChangeset
for help on using the changeset viewer.