- Timestamp:
- May 9, 2011, 2:59:07 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/bigships/src/orxonox/worldentities/pawns/SpaceShip.h
r7801 r8426 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 removeAllEngines(); 69 70 void setSpeedFactor(float factor); 71 float getSpeedFactor(); // Gets mean speed factor 72 float getMaxSpeedFront(); // gets largest speed forward 73 float getBoostFactor(); // gets mean boost factor 66 74 67 75 inline void setSteeringDirection(const Vector3& direction) … … 69 77 inline const Vector3& getSteeringDirection() const 70 78 { return this->steering_; } 79 inline void resetEngineTicks() 80 { this->engineTicksNotDone = this->engineList_.size(); } 81 inline void oneEngineTickDone() 82 { this->engineTicksNotDone--; } 83 inline const bool hasEngineTicksRemaining() 84 { return (this->engineTicksNotDone>0); } 71 85 72 void setBoost(bool bBoost);73 86 inline bool getBoost() const 74 87 { return this->bBoost_; } 75 76 inline void setEngineTemplate(const std::string& temp)77 { this->enginetemplate_ = temp; this->loadEngineTemplate(); }78 inline const std::string& getEngineTemplate() const79 { return this->enginetemplate_; }80 81 inline void setPermanentBoost(bool bPermanent)82 { this->bPermanentBoost_ = bPermanent; }83 inline bool getPermanentBoost() const84 { return this->bPermanentBoost_; }85 88 86 89 protected: … … 90 93 bool bBoost_; 91 94 bool bBoostCooldown_; 92 bool bPermanentBoost_;93 95 float boostPower_; 94 96 float initialBoostPower_; … … 106 108 void registerVariables(); 107 109 virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const; 108 109 void loadEngineTemplate();110 110 111 //All things booster 112 void changedEnableMotionBlur(); 111 113 void boostCooledDown(void); 112 114 113 std::string enginetemplate_; 114 Engine* engine_; 115 Shader* boostBlur_; 116 float blurStrength_; 117 bool bEnableMotionBlur_; 118 119 std::vector<Engine*> engineList_; 120 int engineTicksNotDone; // Used for knowing when to reset temporary variables. 115 121 Timer timer_; 116 122 };
Note: See TracChangeset
for help on using the changeset viewer.