[Orxonox-commit 6519] r11163 - in code/branches/tgidronFS16: data/levels data/levels/templates data/overlays src/modules/hover

tgidron at orxonox.net tgidron at orxonox.net
Thu Apr 14 13:00:08 CEST 2016


Author: tgidron
Date: 2016-04-14 13:00:08 +0200 (Thu, 14 Apr 2016)
New Revision: 11163

Modified:
   code/branches/tgidronFS16/data/levels/Hover.oxw
   code/branches/tgidronFS16/data/levels/templates/spaceshipHover.oxt
   code/branches/tgidronFS16/data/overlays/HoverHUD.oxo
   code/branches/tgidronFS16/src/modules/hover/FlagHUD.cc
   code/branches/tgidronFS16/src/modules/hover/Hover.cc
   code/branches/tgidronFS16/src/modules/hover/Hover.h
Log:
Pickup Development

Modified: code/branches/tgidronFS16/data/levels/Hover.oxw
===================================================================
--- code/branches/tgidronFS16/data/levels/Hover.oxw	2016-04-01 17:38:22 UTC (rev 11162)
+++ code/branches/tgidronFS16/data/levels/Hover.oxw	2016-04-14 11:00:08 UTC (rev 11163)
@@ -24,6 +24,31 @@
 MAZE_SIZE = MAZE_NUM_CELLS*MAZE_CELL_SIZE
 ?>
 
+<Template name=destroyhoverpickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="0.6,0.⁰,0.8" material="Asterisk" scale=0.65 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<PickupRepresentation
+    name = "destroyhover"
+    pickupName = "Destroy Carrier Pickup"
+    pickupDescription = "destroys you."
+    spawnerTemplate = "destroyhoverpickupRepresentation"
+    inventoryRepresentation = "destroyCarrierPickup"
+/>
+
+
 <Level
 plugins = hover
 gametype = Hover
@@ -33,6 +58,9 @@
   </templates>
   <?lua include("includes/notifications.oxi") ?>
 
+
+
+
   <Scene
     ambientlight = "0.8, 0.8, 0.8"
     skybox       = "Orxonox/Starbox"

Modified: code/branches/tgidronFS16/data/levels/templates/spaceshipHover.oxt
===================================================================
--- code/branches/tgidronFS16/data/levels/templates/spaceshipHover.oxt	2016-04-01 17:38:22 UTC (rev 11162)
+++ code/branches/tgidronFS16/data/levels/templates/spaceshipHover.oxt	2016-04-14 11:00:08 UTC (rev 11163)
@@ -19,9 +19,9 @@
 
    primaryThrust     = 100
    auxilaryThrust    = 1
-   rotationThrust    = 30
+   rotationThrust    = 40
 
-   jumpBoost = 90
+   jumpBoost = 120
 
    lift = 1;
    stallSpeed = 220;

Modified: code/branches/tgidronFS16/data/overlays/HoverHUD.oxo
===================================================================
--- code/branches/tgidronFS16/data/overlays/HoverHUD.oxo	2016-04-01 17:38:22 UTC (rev 11162)
+++ code/branches/tgidronFS16/data/overlays/HoverHUD.oxo	2016-04-14 11:00:08 UTC (rev 11163)
@@ -44,7 +44,7 @@
       <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
     </HUDHealthBar>
 
-
+    
     <HUDNavigation
      name          = "Navigation"
      correctaspect = true

Modified: code/branches/tgidronFS16/src/modules/hover/FlagHUD.cc
===================================================================
--- code/branches/tgidronFS16/src/modules/hover/FlagHUD.cc	2016-04-01 17:38:22 UTC (rev 11162)
+++ code/branches/tgidronFS16/src/modules/hover/FlagHUD.cc	2016-04-14 11:00:08 UTC (rev 11163)
@@ -53,8 +53,8 @@
         this->panel_->setMaterialName("Hover/Flag");
         this->overlay_->add2D(this->panel_);
 
-        this->flagCount_ = 1;
-        setFlagCount(1);
+        this->flagCount_ = 5;
+        setFlagCount(5);
     }
 
     FlagHUD::~FlagHUD()

Modified: code/branches/tgidronFS16/src/modules/hover/Hover.cc
===================================================================
--- code/branches/tgidronFS16/src/modules/hover/Hover.cc	2016-04-01 17:38:22 UTC (rev 11162)
+++ code/branches/tgidronFS16/src/modules/hover/Hover.cc	2016-04-14 11:00:08 UTC (rev 11163)
@@ -40,6 +40,9 @@
 #include "core/CoreIncludes.h"
 #include "gamestates/GSLevel.h"
 
+#include "pickup/PickupSpawner.h"
+#include "pickup/Pickup.h"
+
 namespace orxonox
 {
     RegisterUnloadableClass(Hover);
@@ -60,7 +63,6 @@
 
         this->setHUDTemplate("HoverHUD");
 
-        
     }
 
     void Hover::start()
@@ -88,6 +90,8 @@
                 (new HoverWall(origin_->getContext()))->init(i+1,      numCells, cellSize, cellHeight, 2);
             }
 
+
+
             //Generate inner Walls according to levelcode
             for(int y=0; y<numCells; y++){
                 for(int x=0; x<numCells; x++){
@@ -102,13 +106,23 @@
             }
 
             //Generate 5 flags randomly (test only 1 flag)
-            for ( int i = 0; i < 1; i++ )
+            for ( int i = 0; i < 5; i++ )
             {
                 HoverFlag* flag = new HoverFlag(origin_->getContext());
                 flag->init(rand()%numCells, rand()%numCells, cellSize);
                 flags_.push_back(flag);
             }
+            
 
+            //Generate 10 Pickups randomly
+            for (int i = 0; i<10; i++)
+            {
+                PickupSpawner* pickup = new PickupSpawner(origin_->getContext());
+                //PickupSpawner(this->getContext());
+                //pickup->createDroppedPickup(this->getContext(), pickup , this, 10);
+                pickups_.push_back(pickup);
+            }
+
         } 
     }
 
@@ -116,7 +130,7 @@
 
     void Hover::startLevel(){
         //Generate 5 flags randomly (test only 1 flag)
-            for ( int i = 0; i < 1; i++ )
+            for ( int i = 0; i < 5; i++ )
             {
                 HoverFlag* flag = new HoverFlag(origin_->getContext());
                 flag->init(rand()%numCells, rand()%numCells, cellSize);

Modified: code/branches/tgidronFS16/src/modules/hover/Hover.h
===================================================================
--- code/branches/tgidronFS16/src/modules/hover/Hover.h	2016-04-01 17:38:22 UTC (rev 11162)
+++ code/branches/tgidronFS16/src/modules/hover/Hover.h	2016-04-14 11:00:08 UTC (rev 11163)
@@ -41,6 +41,7 @@
 
 #include "gametypes/Gametype.h"
 #include "HoverOrigin.h"
+#include "pickup/PickupSpawner.h"
 
 namespace orxonox
 {
@@ -60,6 +61,7 @@
             void endLevel();
 
 
+
             inline int getNumberOfFlags() const
                 { return this->numberOfFlags_; }
 
@@ -75,6 +77,8 @@
             int cellSize;
             int cellHeight;
             int numCells;
+
+            std::vector<PickupSpawner*> pickups_;
     };
 }
 




More information about the Orxonox-commit mailing list