[Orxonox-commit 7117] r11734 - in code/branches/Presentation_HS17_merge/src/modules: asteroidmining pickup
landauf at orxonox.net
landauf at orxonox.net
Sun Feb 11 18:06:18 CET 2018
Author: landauf
Date: 2018-02-11 18:06:18 +0100 (Sun, 11 Feb 2018)
New Revision: 11734
Modified:
code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.cc
code/branches/Presentation_HS17_merge/src/modules/pickup/Pickup.h
code/branches/Presentation_HS17_merge/src/modules/pickup/PickupSpawner.h
Log:
[AsteroidMining_HS17] cleanup changes in common code
Modified: code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.cc
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.cc 2018-02-11 17:04:36 UTC (rev 11733)
+++ code/branches/Presentation_HS17_merge/src/modules/asteroidmining/AsteroidMinable.cc 2018-02-11 17:06:18 UTC (rev 11734)
@@ -49,7 +49,6 @@
ANDERORTS VERÄNDERTE SACHEN:
Pickup-Zeug:
-o Pickup.h: createSpawner() neu public statt private
o PickupSpawner.h: Zugriffsrechte setPickupTemplateName() und setMaxSpawnedItems()
o PickupSpawner.h: In Tick() zwei Testbedingungen eingefügt.
o Pawn.h: Attribut acceptsPickups_ inklusive get/set.
Modified: code/branches/Presentation_HS17_merge/src/modules/pickup/Pickup.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/pickup/Pickup.h 2018-02-11 17:04:36 UTC (rev 11733)
+++ code/branches/Presentation_HS17_merge/src/modules/pickup/Pickup.h 2018-02-11 17:06:18 UTC (rev 11734)
@@ -144,12 +144,9 @@
virtual void changedPickedUp(void) override; //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
-
+ protected:
virtual bool createSpawner(void) override; //!< Facilitates the creation of a PickupSpawner upon dropping of the Pickupable.
-
- protected:
-
/**
@brief Sets the representation name which refers to the name of the PickupRepresentation that is used to represent this pickup.
*/
Modified: code/branches/Presentation_HS17_merge/src/modules/pickup/PickupSpawner.h
===================================================================
--- code/branches/Presentation_HS17_merge/src/modules/pickup/PickupSpawner.h 2018-02-11 17:04:36 UTC (rev 11733)
+++ code/branches/Presentation_HS17_merge/src/modules/pickup/PickupSpawner.h 2018-02-11 17:06:18 UTC (rev 11734)
@@ -91,6 +91,12 @@
inline float getTriggerDistance() const
{ return this->triggerDistance_; }
/**
+ @brief Set the distance in which to trigger.
+ @param value The new distance in which to trigger.
+ */
+ inline void setTriggerDistance(float value)
+ { this->triggerDistance_ = value; }
+ /**
@brief Get the time to respawn.
@returns Returns the time after which this gets re-actived.
*/
@@ -97,11 +103,19 @@
inline float getRespawnTime() const
{ return this->respawnTime_; }
/**
+ @brief Set the time to respawn.
+ @param time New time after which this gets re-actived.
+ */
+ inline void setRespawnTime(float time)
+ { this->respawnTime_ = time; }
+ /**
@brief Get the maximum number of items that will be spawned by this PickupSpawner.
@return Returns the maximum number of items spawned by this PickupSpawner.
*/
inline int getMaxSpawnedItems(void) const
{ return this->maxSpawnedItems_; }
+ void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
+
/**
@brief Returns the name of the template which is used to create a pickup for this spawner.
*/
@@ -113,14 +127,9 @@
inline Template* getPickupTemplate() const
{return this->pickupTemplate_; }
-
void setPickupTemplateName(const std::string& name);
- void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
+ void setPickupTemplate(Template* temp);
- inline void setRespawnTime(float time)
- { this->respawnTime_ = time; }
-
-
private:
void initialize(void);
@@ -138,21 +147,6 @@
void block(PickupCarrier* carrier, unsigned int time = DEFAULT_BLOCKED_TIME)
{ this->blocked_.insert(std::pair<PickupCarrier*, std::time_t>(carrier, std::time(0)+time)); }
- /**
- @brief Set the distance in which to trigger.
- @param value The new distance in which to trigger.
- */
- inline void setTriggerDistance(float value)
- { this->triggerDistance_ = value; }
- /**
- @brief Set the time to respawn.
- @param time New time after which this gets re-actived.
- */
-
-
-
- void setPickupTemplate(Template* temp);
-
Pickupable* createPickup(void); //!< Creates a new Pickupable.
void setPickupable(Pickupable* pickup); //!< Sets a Pickupable for the PickupSpawner to spawn.
More information about the Orxonox-commit
mailing list