Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 29, 2010, 12:30:32 PM (14 years ago)
Author:
dafrick
Message:

Working towards a functioning PickupInventory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup4/src/modules/pickup/PickupRepresentation.h

    r6540 r6632  
    4545#include "core/BaseObject.h"
    4646
    47 namespace orxonox
    48 {
     47namespace orxonox // tolua_export
     48{ // tolua_export
    4949
    5050    /**
     
    5353        They are created through XML and are registered with the PickupManager.
    5454    */
    55     class _PickupExport PickupRepresentation : public BaseObject
    56     {
     55    class _PickupExport PickupRepresentation // tolua_export
     56        : public BaseObject
     57    { // tolua_export
    5758       
    5859        public:
     
    9091                { this->spawnerRepresentation_ = representation; }
    9192            /**
     93            @brief Set the image representing the pickup in the PickupInventory.
     94            @param image A string with the name of the image representing the pickup.
     95            */
     96            inline void setInventoryRepresentation(const std::string& image)
     97                { this->inventoryRepresentation_ = image; }
     98            /**
    9299            @brief Set the Pickupable that is represented by this PickupRepresentation.
    93100            @param pickup A pointer to the Pickupable.
     
    100107            @return Returns the name.
    101108            */
    102             inline const std::string& getName(void)
    103                 { return this->name_; }
     109            inline const std::string& getName(void) { return this->name_; } // tolua_export
    104110            /**
    105111            @brief Get the description of the Pickupable represented by this PickupRepresentation.
    106112            @return Returns the description.
    107113            */
    108             inline const std::string& getDescription(void)
    109                 { return this->description_; }
     114            inline const std::string& getDescription(void) { return this->description_; } // tolua_export
    110115            /**
    111116            @brief Get the name of spawnerTemplate the Pickupable represented by this PickupRepresentation.
     
    121126            inline const StaticEntity* getSpawnerRepresentationIndex(unsigned int index)
    122127                { if(index == 0) return this->spawnerRepresentation_; return NULL; }
     128            /**
     129            @brief Get the name of the image representing the pickup in the PickupInventory.
     130            @return Returns the name of the image as a string.
     131            */
     132            inline const std::string& getInventoryRepresentation(void) { return this->inventoryRepresentation_; } // tolua_export
    123133            /**
    124134            @brief Get the Pickupable represented by this PickupRepresentation.
     
    139149            std::string spawnerTemplate_; //!<  The name of the template of this PickupRepresentation.
    140150            StaticEntity* spawnerRepresentation_; //!< The spawnerRepresentation of this PickupRepresentation.
     151            std::string inventoryRepresentation_; //!< The name of an image representing the pickup in the PickupInventory. TODO: Exact format and placement of image?
    141152           
    142153            Pickupable* pickup_; //!< The Pickupable that is represented by this PickupRepresentation.
    143154           
    144     };
     155    }; // tolua_export
    145156
    146 }
     157} // tolua_export
    147158   
    148159#endif // _PickupRepresentation_H__
Note: See TracChangeset for help on using the changeset viewer.