Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 23, 2012, 5:56:57 PM (13 years ago)
Author:
decapitb
Message:

safety checkin

Location:
code/branches/captureTheFlag
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • code/branches/captureTheFlag

  • code/branches/captureTheFlag/src/modules/pickup/items/FlagPickup.h

    r9220 r9232  
    3737
    3838#include "pickup/PickupPrereqs.h"
     39#include "worldentities/pawns/Pawn.h"
    3940
    4041#include <string>
     
    4243#include "pickup/Pickup.h"
    4344#include "tools/Timer.h"
     45#include "tools/interfaces/Tickable.h"
    4446
    4547
     
    4749/*
    4850    @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   
    6152
    6253    @author
     
    7667            virtual void tick(float dt);
    7768
    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                       
    8282            virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
    8383
     
    8989            @param type The type of this pickup as an enum.
    9090            */
    91             inline void setFlagTypeDirect(pickupFlagType::Value type)
     91            inline void setFlagTypeDirect(int type)
    9292                { this->flagType_ = type; }
    93             void setFlagType(std::string type); //!< Set the type of the FlagPickup.
     93            void setFlagType(int type); //!< Set the type of the FlagPickup.
    9494
    9595        private:
    9696            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);
    9897            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                       
    108103    };
    109104}
Note: See TracChangeset for help on using the changeset viewer.