Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11163


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

Pickup Development

Location:
code/branches/tgidronFS16
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tgidronFS16/data/levels/Hover.oxw

    r11052 r11163  
    2525?>
    2626
     27<Template name=destroyhoverpickupRepresentation>
     28    <PickupRepresentation>
     29        <spawner-representation>
     30            <StaticEntity>
     31                <attached>
     32                    <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=0.1>
     33                        <attached>
     34                            <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Asterisk" scale=0.65 />
     35                        </attached>
     36                    </Billboard>
     37                </attached>
     38            </StaticEntity>
     39        </spawner-representation>
     40    </PickupRepresentation>
     41</Template>
     42
     43<PickupRepresentation
     44    name = "destroyhover"
     45    pickupName = "Destroy Carrier Pickup"
     46    pickupDescription = "destroys you."
     47    spawnerTemplate = "destroyhoverpickupRepresentation"
     48    inventoryRepresentation = "destroyCarrierPickup"
     49/>
     50
     51
    2752<Level
    2853plugins = hover
     
    3358  </templates>
    3459  <?lua include("includes/notifications.oxi") ?>
     60
     61
     62
    3563
    3664  <Scene
  • code/branches/tgidronFS16/data/levels/templates/spaceshipHover.oxt

    r11151 r11163  
    2020   primaryThrust     = 100
    2121   auxilaryThrust    = 1
    22    rotationThrust    = 30
     22   rotationThrust    = 40
    2323
    24    jumpBoost = 90
     24   jumpBoost = 120
    2525
    2626   lift = 1;
  • code/branches/tgidronFS16/data/overlays/HoverHUD.oxo

    r11151 r11163  
    4545    </HUDHealthBar>
    4646
    47 
     47   
    4848    <HUDNavigation
    4949     name          = "Navigation"
  • 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.