Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 14, 2016, 1:00:08 PM (9 years ago)
Author:
tgidron
Message:

Pickup Development

Location:
code/branches/tgidronFS16/src/modules/hover
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tgidronFS16/src/modules/hover/FlagHUD.cc

    r11151 r11163  
    5454        this->overlay_->add2D(this->panel_);
    5555
    56         this->flagCount_ = 1;
    57         setFlagCount(1);
     56        this->flagCount_ = 5;
     57        setFlagCount(5);
    5858    }
    5959
  • code/branches/tgidronFS16/src/modules/hover/Hover.cc

    r11151 r11163  
    4141#include "gamestates/GSLevel.h"
    4242
     43#include "pickup/PickupSpawner.h"
     44#include "pickup/Pickup.h"
     45
    4346namespace orxonox
    4447{
     
    6164        this->setHUDTemplate("HoverHUD");
    6265
    63        
    6466    }
    6567
     
    8991            }
    9092
     93
     94
    9195            //Generate inner Walls according to levelcode
    9296            for(int y=0; y<numCells; y++){
     
    103107
    104108            //Generate 5 flags randomly (test only 1 flag)
    105             for ( int i = 0; i < 1; i++ )
     109            for ( int i = 0; i < 5; i++ )
    106110            {
    107111                HoverFlag* flag = new HoverFlag(origin_->getContext());
    108112                flag->init(rand()%numCells, rand()%numCells, cellSize);
    109113                flags_.push_back(flag);
     114            }
     115           
     116
     117            //Generate 10 Pickups randomly
     118            for (int i = 0; i<10; i++)
     119            {
     120                PickupSpawner* pickup = new PickupSpawner(origin_->getContext());
     121                //PickupSpawner(this->getContext());
     122                //pickup->createDroppedPickup(this->getContext(), pickup , this, 10);
     123                pickups_.push_back(pickup);
    110124            }
    111125
     
    117131    void Hover::startLevel(){
    118132        //Generate 5 flags randomly (test only 1 flag)
    119             for ( int i = 0; i < 1; i++ )
     133            for ( int i = 0; i < 5; i++ )
    120134            {
    121135                HoverFlag* flag = new HoverFlag(origin_->getContext());
  • code/branches/tgidronFS16/src/modules/hover/Hover.h

    r11151 r11163  
    4242#include "gametypes/Gametype.h"
    4343#include "HoverOrigin.h"
     44#include "pickup/PickupSpawner.h"
    4445
    4546namespace orxonox
     
    6162
    6263
     64
    6365            inline int getNumberOfFlags() const
    6466                { return this->numberOfFlags_; }
     
    7678            int cellHeight;
    7779            int numCells;
     80
     81            std::vector<PickupSpawner*> pickups_;
    7882    };
    7983}
Note: See TracChangeset for help on using the changeset viewer.