Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 26, 2011, 12:58:09 AM (13 years ago)
Author:
dafrick
Message:

Merging bigships branch into presentation branch.

Location:
code/branches/presentation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation

  • code/branches/presentation/src/orxonox/worldentities/pawns/SpaceShip.h

    r8582 r8589  
    6161            virtual void boost(bool bBoost); // Starts or stops boosting.
    6262
    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
    6674
    6775            inline void setSteeringDirection(const Vector3& direction)
     
    6977            inline const Vector3& getSteeringDirection() const
    7078                { 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); }
    7185
    7286            inline bool getBoost() const
    7387                { return this->bBoost_; }
    74 
    75             inline void setEngineTemplate(const std::string& temp)
    76                 { this->enginetemplate_ = temp; this->loadEngineTemplate(); }
    77             inline const std::string& getEngineTemplate() const
    78                 { return this->enginetemplate_; }
    7988
    8089        protected:
     
    102111            void registerVariables();
    103112            virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const;
    104 
    105             void loadEngineTemplate();
    106113           
     114            //All things booster
     115            void changedEnableMotionBlur();
    107116            void boostCooledDown(void);
    108117       
     
    111120            void shakeCamera(float dt);
    112121
    113             std::string enginetemplate_;
    114             Engine* engine_;
     122            Shader* boostBlur_;
     123            float blurStrength_;
     124            bool bEnableMotionBlur_;
     125
     126            std::vector<Engine*> engineList_;
     127            int engineTicksNotDone; // Used for knowing when to reset temporary variables.
    115128            Timer timer_;
    116129            Vector3 cameraOriginalPosition_;
Note: See TracChangeset for help on using the changeset viewer.