Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 30, 2015, 7:51:49 PM (9 years ago)
Author:
fvultier
Message:

The weapon system HUD rescales properly if the window size changes.

Location:
code/branches/fabienHS15/src/orxonox/worldentities/pawns
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/fabienHS15/src/orxonox/worldentities/pawns/SpaceShip.cc

    r10216 r10724  
    297297        }
    298298    }
     299
     300    void SpaceShip::gainBoostPower(float gainedBoostPower)
     301    {
     302        this->boostPower_ += gainedBoostPower;
     303       
     304        if (this->boostPower_ > this->initialBoostPower_)
     305        {
     306            this->boostPower_ = this->initialBoostPower_;
     307        }
     308
     309        // If the booster is in cooldown mode and we gained boost power, the abort the cooldown.
     310        if (this->isBoostCoolingDown() && this->boostPower_ > 0.0f)
     311        {
     312            timer_.stopTimer();
     313            this->boostCooledDown();
     314        }
     315    }
     316
    299317    /**
    300318    @brief
  • code/branches/fabienHS15/src/orxonox/worldentities/pawns/SpaceShip.h

    r10437 r10724  
    250250            inline float getShakeAmplitude() const
    251251                { return this->shakeAmplitude_; }
     252            /**
     253            @brief Add boost power. Is non-negative.
     254            @return Returns the current boost power.
     255            */
     256            void gainBoostPower(float gainedBoostPower);
    252257
    253258        protected:
Note: See TracChangeset for help on using the changeset viewer.