Changeset 8706 for code/trunk/src/orxonox/interfaces/PlayerTrigger.h
- Timestamp:
- Jun 14, 2011, 8:53:28 PM (13 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/interfaces/PlayerTrigger.h
r7601 r8706 39 39 40 40 #include "core/OrxonoxClass.h" 41 #include "core/WeakPtr.h" 41 42 42 43 namespace orxonox … … 44 45 /** 45 46 @brief 46 PlayerTrigger is an interface if implemented by a specific trigger can be used to recover the Player (or more preciselythe @ref orxonox::Pawn "Pawn") that triggered it.47 PlayerTrigger is an interface if implemented by a specific trigger can be used to recover the Player (or the @ref orxonox::Pawn "Pawn") that triggered it. 47 48 48 49 @author … … 58 59 59 60 /** 60 @brief Returns the playerthat triggered the PlayerTrigger.61 @brief Returns the Pawn that triggered the PlayerTrigger. 61 62 @return Returns a pointer to the Pawn that triggered the PlayerTrigger. 62 63 */ 63 inline Pawn* getTriggeringPlayer(void) const 64 inline Pawn* getTriggeringPawn(void) const 65 { return this->pawn_.get(); } 66 67 /** 68 @brief Returns the player that triggered the PlayerTrigger. 69 @return Returns a pointer to the PlayerInfo that triggered the PlayerTrigger. 70 */ 71 inline PlayerInfo* getTriggeringPlayer(void) const 64 72 { return this->player_; } 65 73 66 74 /** 67 @brief Checks whether the PlayerTrigger normally returns a Pawn .68 @return Returns true if the PlayerTrigger normally returns a Pawn .75 @brief Checks whether the PlayerTrigger normally returns a Pawn/PlayerInfo. 76 @return Returns true if the PlayerTrigger normally returns a Pawn/PlayerInfo. 69 77 */ 70 78 inline bool isForPlayer(void) const … … 76 84 @param player A pointer to the Pawn that triggered the PlayerTrigger. 77 85 */ 78 inline void setTriggeringPlayer(Pawn* player) 79 { this->player_ = player; } 86 void setTriggeringPawn(Pawn* pawn); 80 87 81 88 /** … … 87 94 88 95 private: 89 Pawn* player_; //!< The player that triggered the PlayerTrigger. 96 WeakPtr<PlayerInfo> player_; //!< The player that triggered the PlayerTrigger. 97 WeakPtr<Pawn> pawn_; //!< The Pawn that triggered the PlayerTrigger. 90 98 bool isForPlayer_; //!< Is true when the PlayerTrigger should be set to normally be triggered by Pawns. 91 99
Note: See TracChangeset
for help on using the changeset viewer.