- Timestamp:
- May 23, 2012, 5:56:57 PM (13 years ago)
- Location:
- code/branches/captureTheFlag
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
code/branches/captureTheFlag
- Property svn:mergeinfo changed
/code/branches/waypoints (added) merged: 9032,9043,9054,9093,9105,9159,9177,9219
- Property svn:mergeinfo changed
-
code/branches/captureTheFlag/src/modules/pickup/items/FlagPickup.h
r9220 r9232 37 37 38 38 #include "pickup/PickupPrereqs.h" 39 #include "worldentities/pawns/Pawn.h" 39 40 40 41 #include <string> … … 42 43 #include "pickup/Pickup.h" 43 44 #include "tools/Timer.h" 45 #include "tools/interfaces/Tickable.h" 44 46 45 47 … … 47 49 /* 48 50 @ingroup PickupItems 49 */ 50 namespace pickupFlagType 51 { 52 enum Value 53 { 54 blue, //!< Means that the @ref orxonox::FlagPickup "FlagPickup" is the flag of the blue team. 55 red, //!< Means that the @ref orxonox::FlagPickup "FlagPickup" is the flag of the red team. 56 neutral //!< Means that the @ref orxonox::FlagPickup "FlagPickup" is a neutral flag. 57 }; 58 } 59 60 /** 51 61 52 62 53 @author … … 76 67 virtual void tick(float dt); 77 68 78 const std::string& getFlagType(void) const; //!< Get the flag type of this pickup. 79 80 int teamScore_; 81 69 const int getFlagType(void) const; //!< Get the flag type of this pickup. 70 71 inline bool isPickedUp() const 72 { return this->bPickedUp_; } 73 inline Pawn* pickedUpBy() const 74 { return this->pickedUpBy_; } 75 76 inline void setPickedUp(bool pickedUp) 77 { this->bPickedUp_ = pickedUp; } 78 79 inline void ignorePickedUp() 80 { this->Pickupable::destroy(); } 81 82 82 virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around. 83 83 … … 89 89 @param type The type of this pickup as an enum. 90 90 */ 91 inline void setFlagTypeDirect( pickupFlagType::Valuetype)91 inline void setFlagTypeDirect(int type) 92 92 { this->flagType_ = type; } 93 void setFlagType( std::stringtype); //!< Set the type of the FlagPickup.93 void setFlagType(int type); //!< Set the type of the FlagPickup. 94 94 95 95 private: 96 96 Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails. 97 int getTeam(PlayerInfo* player);98 97 void initialize(void); //!< Initializes the member variables. 99 100 pickupFlagType::Value flagType_; //!< The type of the FlagPickup. 101 102 103 //! Strings for the flag types. 104 static const std::string flagTypeBlue_s; 105 static const std::string flagTypeRed_s; 106 static const std::string flagTypeNeutral_s; 107 98 Pawn* pickedUpBy_; 99 int flagType_; 100 101 bool bPickedUp_; 102 108 103 }; 109 104 }
Note: See TracChangeset
for help on using the changeset viewer.