- Timestamp:
- May 17, 2010, 1:22:26 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/objects/triggers/DistanceMultiTrigger.h
r6864 r6906 48 48 /** 49 49 @brief 50 The DistanceMultiTrigger is a trigger that triggers whenever an object (that is of the specified target type) is in a specified range of the DistanceMultiTrigger. 50 The DistanceMultiTrigger is a trigger that triggers whenever an object (that is of the specified target type) is in a specified range of the DistanceMultiTrigger. The object can be specified further by adding a DistanceTriggerBeacon (just attaching it) to the objects that can trigger this DistanceMultiTrigger and specify the name of the DistanceTriggerBeacon with the parameter targetname and only objects that hav a DistanceTriggerBeacon with that name attached will trigger the DistanceMultiTrigger. 51 51 @see MultiTrigger.h 52 52 For more information on MultiTriggers. … … 63 63 void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a DistanceMultiTrigger object through XML. 64 64 65 /** 66 @brief Set the target name of DistanceTriggerBeacons that triggers this DistanceMultiTrigger. 67 @param targename The name of the DistanceTriggerBeacon as a string. 68 */ 69 inline void setTargetName(const std::string& targetname) 70 { if(targetname.compare(BLANKSTRING) != 0) this->singleTargetMode_ = true; else this->singleTargetMode_ = false; this->targetName_ = targetname; } 71 /** 72 @brief Get the target name of the DistanceTriggerbeacon, that triggers this DistanceMultiTrigger. 73 @return Returns the target name as a string. 74 */ 75 inline const std::string& getTargetName(void) 76 { return this->targetName_; } 77 65 78 /** 66 79 @brief Set the distance at which the DistanceMultiTrigger triggers. … … 96 109 private: 97 110 float distance_; //!< The distance at which the DistanceMultiTrigger triggers. 111 std::string targetName_; //!< The target name, used in singleTargetMode. 112 bool singleTargetMode_; //!< To indicate whe the MultiDistanceTrigger is in single-target-mode. 113 98 114 std::map<WorldEntity*, WeakPtr<WorldEntity>* > range_; //!< The set of entities that currently are in range of the DistanceMultiTrigger. 99 115
Note: See TracChangeset
for help on using the changeset viewer.