Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11293 for code


Ignore:
Timestamp:
Nov 17, 2016, 4:58:06 PM (8 years ago)
Author:
patricwi
Message:

improvements on pickup system

Location:
code/branches/HUD_HS16/src/modules/overlays/hud
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/HUD_HS16/src/modules/overlays/hud/HUDPickupItem.cc

    r11277 r11293  
    6565    }
    6666
    67     void initializeMaterial(std::string s)
     67    void initializeMaterial(const std::string& s)
    6868    {
    6969        overlayElement_->setMaterialName(s);
  • code/branches/HUD_HS16/src/modules/overlays/hud/HUDPickupItem.h

    r11277 r11293  
    3636
    3737        // void setPickup(Pickup* pickup); 
    38         void initializeMaterial(std::string s);   
     38        void initializeMaterial(const std::string& s);   
    3939
    4040    private:
  • code/branches/HUD_HS16/src/modules/overlays/hud/HUDPickupSystem.cc

    r11277 r11293  
    5050        overlayElement_->setPosition(0.0f,0.0f);
    5151        overlayElement_->setDimensions(0.70f,0.15f);
    52         orxout() << "hello HUDPickupSystem" << endl;
     52        orxout() << "hello here is the HUDPickupSystem" << endl;
    5353        this->background_->addChild(overlayElement_);
    5454
     
    6565   //TODO: XMLPort
    6666
    67     void HUDPickupSystem::updatePickupList(std::vector<Pickup> picks)
     67    void HUDPickupSystem::updatePickupList(std::vector<WeakPtr<Pickup>> picks)
    6868    {
    69         for(Pickup p : picks)
     69        for(Pickup* p : picks)
    7070        {
    71             HUDPickupItem item = new HUDPickupItem(this->getContext());
    72             item.initializeMaterial(p.getRepresentationName());
     71            HUDPickupItem* item = new HUDPickupItem(this->getContext());
     72            item->initializeMaterial(p->getRepresentationName());
    7373        }
    7474    }
  • code/branches/HUD_HS16/src/modules/overlays/hud/HUDPickupSystem.h

    r11277 r11293  
    4141#include "pickup/Pickup.h"
    4242#include "pickup/PickupRepresentation.h"
     43#include "HUDPickupItem.h"
    4344
    4445namespace orxonox
     
    5859        // virtual void sizeChanged() override;
    5960    private:
    60         void updatePickupList(std::vector<Pickup> picks);
     61        void updatePickupList(std::vector<WeakPtr<Pickup>> picks);
    6162        void createPickupList();
    6263        void destroyAll();
Note: See TracChangeset for help on using the changeset viewer.