- Timestamp:
- Apr 7, 2011, 4:11:20 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h
r8166 r8201 26 26 * 27 27 */ 28 29 /* TODO: - Markiere SpaceBoundaries-Position mit einem schoenen Objekt 30 - Kugel-Model mal hinzufuegen, das nur sichtbar ist, wenn man genuegend nah an maxDistance dran ist 31 - Reflexion an obiger Kugel beim Versuch durchzudringen 32 */ 28 33 29 34 #ifndef _SpaceBoundaries_H__ 30 35 #define _SpaceBoundaries_H__ 31 36 32 /* Folgender Block ist Copy-Paste und somit teilweise wohl unnoetig */33 #include "OrxonoxPrereqs.h"34 #include "core/SubclassIdentifier.h"35 36 37 /* Einige, spezifische include-Statements */ 37 38 #include "core/CoreIncludes.h" 38 39 #include "tools/interfaces/Tickable.h" 40 #include "interfaces/RadarViewable.h" 39 41 #include "worldentities/StaticEntity.h" 40 42 #include "worldentities/WorldEntity.h" … … 44 46 #include <string> 45 47 48 /** 49 @brief SpaceBoundaries gives level creators the possibility to bar Pawns from leaving a defined area. 50 51 Four attributes can/should be defined in the XML-File: 52 'position', 'warnDistance', 'maxDistance', 'healthDecrease'. 53 */ 46 54 47 55 namespace orxonox … … 53 61 ~SpaceBoundaries(); 54 62 55 void setCenter(Vector3 r);56 Vector3 getCenter();57 58 63 void setMaxDistance(float r); 59 64 float getMaxDistance(); … … 61 66 void setWarnDistance(float r); 62 67 float getWarnDistance(); 68 69 void setHealthDecrease(float amount); 70 float getHealthDecrease(); 63 71 64 72 void XMLPort(Element& xmlelement, XMLPort::Mode mode); … … 67 75 68 76 private: 69 Vector3 center_; 70 float maxDistance_; 71 float warnDistance_; 77 float maxDistance_; //!< maximal zulaessige Entfernung von 'this->getPosition()'. 78 float warnDistance_; //!< Entfernung von 'this->getPosition()', ab der eine Warnung angezeigt wird, dass man bald das zulaessige Areal verlaesst. 79 80 float healthDecrease_; //!< Mass fuer die Anzahl Health-Points, die nach ueberschreiten der Entfernung 'maxDistance_' von 'this->getPosition()' abgezogen werden. 81 //!< Empfohlene Werte: 0.1 (langsame Health-Verminderung) bis 5 (sehr schnelle Health-Verminderung) 82 83 RadarViewable* centerRadar_; //!< Repraesentation von 'this->getPosition()' auf dem Radar. 72 84 73 float computeDistance(WorldEntity *item); //!< Auf den Mittelpunkt ' center' bezogen.85 float computeDistance(WorldEntity *item); //!< Auf den Mittelpunkt 'this->getPosition()' bezogen. 74 86 void displayWarning(const std::string warnText); 75 87 bool isHumanPlayer(Pawn *item); 88 76 89 // ColoredTextAreaOverlayElementFactory* pColoredTextAreaOverlayElementFactory; 77 90 };
Note: See TracChangeset
for help on using the changeset viewer.