Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 11, 2018, 6:06:18 PM (7 years ago)
Author:
landauf
Message:

[AsteroidMining_HS17] cleanup changes in common code

Location:
code/branches/Presentation_HS17_merge/src/modules
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.cc

    r11732 r11734  
    5050ANDERORTS VERÄNDERTE SACHEN:
    5151Pickup-Zeug:
    52 o Pickup.h: createSpawner() neu public statt private
    5352o PickupSpawner.h: Zugriffsrechte setPickupTemplateName() und setMaxSpawnedItems()
    5453o PickupSpawner.h: In Tick() zwei Testbedingungen eingefügt.
  • code/branches/Presentation_HS17_merge/src/modules/pickup/Pickup.h

    r11730 r11734  
    145145            virtual void changedPickedUp(void) override; //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
    146146
    147 
     147        protected:
    148148            virtual bool createSpawner(void) override; //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
    149 
    150 
    151         protected:
    152149
    153150            /**
  • code/branches/Presentation_HS17_merge/src/modules/pickup/PickupSpawner.h

    r11730 r11734  
    9292                { return this->triggerDistance_; }
    9393            /**
     94            @brief Set the distance in which to trigger.
     95            @param value The new distance in which to trigger.
     96            */
     97            inline void setTriggerDistance(float value)
     98                { this->triggerDistance_ = value; }
     99            /**
    94100            @brief Get the time to respawn.
    95101            @returns Returns the time after which this gets re-actived.
     
    98104                { return this->respawnTime_; }
    99105            /**
     106            @brief Set the time to respawn.
     107            @param time New time after which this gets re-actived.
     108            */
     109            inline void setRespawnTime(float time)
     110                { this->respawnTime_ = time; }
     111            /**
    100112            @brief Get the maximum number of items that will be spawned by this PickupSpawner.
    101113            @return Returns the maximum number of items spawned by this PickupSpawner.
     
    103115            inline int getMaxSpawnedItems(void) const
    104116                { return this->maxSpawnedItems_; }
     117            void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
     118
    105119            /**
    106120            @brief Returns the name of the template which is used to create a pickup for this spawner.
     
    114128                {return this->pickupTemplate_; }
    115129
    116 
    117130            void setPickupTemplateName(const std::string& name);
    118             void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
    119 
    120             inline void setRespawnTime(float time)
    121                 { this->respawnTime_ = time; }
    122 
     131            void setPickupTemplate(Template* temp);
    123132
    124133        private:
     
    138147            void block(PickupCarrier* carrier, unsigned int time = DEFAULT_BLOCKED_TIME)
    139148                { this->blocked_.insert(std::pair<PickupCarrier*, std::time_t>(carrier, std::time(0)+time)); }
    140 
    141             /**
    142             @brief Set the distance in which to trigger.
    143             @param value The new distance in which to trigger.
    144             */
    145             inline void setTriggerDistance(float value)
    146                 { this->triggerDistance_ = value; }
    147             /**
    148             @brief Set the time to respawn.
    149             @param time New time after which this gets re-actived.
    150             */
    151 
    152 
    153 
    154             void setPickupTemplate(Template* temp);
    155149
    156150            Pickupable* createPickup(void); //!< Creates a new Pickupable.
Note: See TracChangeset for help on using the changeset viewer.