- Timestamp:
- Feb 11, 2018, 6:06:18 PM (7 years ago)
- 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 50 50 ANDERORTS VERÄNDERTE SACHEN: 51 51 Pickup-Zeug: 52 o Pickup.h: createSpawner() neu public statt private53 52 o PickupSpawner.h: Zugriffsrechte setPickupTemplateName() und setMaxSpawnedItems() 54 53 o PickupSpawner.h: In Tick() zwei Testbedingungen eingefügt. -
code/branches/Presentation_HS17_merge/src/modules/pickup/Pickup.h
r11730 r11734 145 145 virtual void changedPickedUp(void) override; //!< Should be called when the pickup has transited from picked up to dropped or the other way around. 146 146 147 147 protected: 148 148 virtual bool createSpawner(void) override; //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable. 149 150 151 protected:152 149 153 150 /** -
code/branches/Presentation_HS17_merge/src/modules/pickup/PickupSpawner.h
r11730 r11734 92 92 { return this->triggerDistance_; } 93 93 /** 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 /** 94 100 @brief Get the time to respawn. 95 101 @returns Returns the time after which this gets re-actived. … … 98 104 { return this->respawnTime_; } 99 105 /** 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 /** 100 112 @brief Get the maximum number of items that will be spawned by this PickupSpawner. 101 113 @return Returns the maximum number of items spawned by this PickupSpawner. … … 103 115 inline int getMaxSpawnedItems(void) const 104 116 { return this->maxSpawnedItems_; } 117 void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items. 118 105 119 /** 106 120 @brief Returns the name of the template which is used to create a pickup for this spawner. … … 114 128 {return this->pickupTemplate_; } 115 129 116 117 130 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); 123 132 124 133 private: … … 138 147 void block(PickupCarrier* carrier, unsigned int time = DEFAULT_BLOCKED_TIME) 139 148 { 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);155 149 156 150 Pickupable* createPickup(void); //!< Creates a new Pickupable.
Note: See TracChangeset
for help on using the changeset viewer.