Changeset 7547 for code/trunk/src/modules/pickup/items/InvisiblePickup.h
- Timestamp:
- Oct 16, 2010, 12:37:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/pickup/items/InvisiblePickup.h
r7545 r7547 40 40 #include <string> 41 41 42 #include <worldentities/pawns/Pawn.h>43 #include "worldentities/StaticEntity.h"44 42 #include "pickup/Pickup.h" 45 43 … … 49 47 @brief 50 48 A pickup that makes the Pawn invisible. 51 There are 2parameters that can be chosen:52 - The <b>activation type</b> It can be chosen to be either <em>immediate</em> or <em>onUse</em>. The activation type essentially (as indicated by the name) defines when the Pawn will be invisible, either immediately after being picked up or only after the player uses it.53 - The <b>duration type</b> It can be chosen to be either <em>once</em> or <em>continuous</em>. For <em>once</em> the InvisiblePickup just makes the Pawn invisible for as long as it is used, for <em>continuous</em> the Pawn is invisible for the specified duration.54 - The <b>duration</b> Specifies how long (in seconds) the invisibility lasts.49 There are 3 parameters that can be chosen: 50 - The @b activationType It can be chosen to be either <em>immediate</em> or <em>onUse</em>. The activation type essentially (as indicated by the name) defines when the Pawn will be invisible, either immediately after being picked up or only after the player uses it. The default is <em>immediate</em>. 51 - The @b durationType< It can be chosen to be either <em>once</em> or <em>continuous</em>. For <em>once</em> the InvisiblePickup just makes the Pawn invisible for as long as it is used, for <em>continuous</em> the Pawn is invisible for the specified duration. The default is <em>once</em>. 52 - The @b duration Specifies how long (in seconds) the invisibility lasts. The default is 0. 55 53 56 An exam le of a XML implementation of a InvisiblePickup would be:54 An example of a XML implementation of a InvisiblePickup would be: 57 55 @code 58 < HealthPickup56 <InvisiblePickup 59 57 activationType = "immediate" 60 58 durationType = "continuous" … … 83 81 @return Returns if the Pawn is invisible. 84 82 */ 85 inline bool getInvisibility(bool) 83 inline bool getInvisibility(bool) const 86 84 { return this->invisible_; } 87 85 /** … … 89 87 @return Returns the time in seconds the InvisibiltyPickup lasts. 90 88 */ 91 inline float getDuration(void) 89 inline float getDuration(void) const 92 90 { return this->duration_; } 93 91 94 92 protected: 95 void initializeIdentifier(void); 93 void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup. 96 94 97 95 bool setInvisible(bool invisibility); //!< Set the Pawn to be invisible or visible again.
Note: See TracChangeset
for help on using the changeset viewer.