[Orxonox-commit 6924] r11545 - in code/branches/CampaignMap_HS17: data/levels src/orxonox/worldentities

boltn at orxonox.net boltn at orxonox.net
Mon Nov 6 16:40:56 CET 2017


Author: boltn
Date: 2017-11-06 16:40:56 +0100 (Mon, 06 Nov 2017)
New Revision: 11545

Added:
   code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.cc
   code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.h
Modified:
   code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw
   code/branches/CampaignMap_HS17/src/orxonox/worldentities/CMakeLists.txt
Log:
Beschriftbaren planet erstellt und in passenderen ordner verschoben.

Modified: code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw
===================================================================
--- code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw	2017-11-06 15:35:06 UTC (rev 11544)
+++ code/branches/CampaignMap_HS17/data/levels/emptyLevel.oxw	2017-11-06 15:40:56 UTC (rev 11545)
@@ -16,7 +16,7 @@
   include("templates/endurancetest_template.oxt")
 ?>
 
-<Level>
+<Level gametype = StoryMode>
   <templates>
     <Template link=lodtemplate_default />
   </templates>
@@ -27,11 +27,7 @@
     skybox       = "Orxonox/Starbox"
   >
 
-
-  <SpawnPoint position="0,-100,0" lookat="0,0,0" roll=180 spawnclass=SpaceShip pawndesign=spaceshipassff />
-
-
-  <StaticEntity position="0,0,0" direction="0,0,0" >
+  <StoryModePlanet position="0,0,0" direction="0,0,0">
   <attached>
 
     <Model position="600,370,0" mesh="planets/moon.mesh" scale=100 />
@@ -62,17 +58,12 @@
     <Billboard colour="1,1,0.05" position="1500,-1300,-2080"  material="Flares/lensflare" scale=5 />
 
   </attached>
-</StaticEntity>
+  </StoryModePlanet>
 
-<MovableEntity>
-    
-
+  <MovableEntity>
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
-    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
-
-</MovableEntity>
-
-    
+  </MovableEntity>  
+  <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
   </Scene>
 </Level>
 

Modified: code/branches/CampaignMap_HS17/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/worldentities/CMakeLists.txt	2017-11-06 15:35:06 UTC (rev 11544)
+++ code/branches/CampaignMap_HS17/src/orxonox/worldentities/CMakeLists.txt	2017-11-06 15:40:56 UTC (rev 11545)
@@ -12,6 +12,7 @@
   TeamSpawnPoint.cc
   ExplosionPart.cc
   Actionpoint.cc
+  StoryModePlanet.cc
 )
 
 ADD_SUBDIRECTORY(pawns)

Added: code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.cc
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.cc	                        (rev 0)
+++ code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.cc	2017-11-06 15:40:56 UTC (rev 11545)
@@ -0,0 +1,55 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Bolt Nikola
+ *   Co-authors:
+ *      Claudio Fanconi
+ *
+ *
+ *	 Authors' Note:
+ *	 The following class inherits of its superclass planet
+ * 	 It is meant only for the Campaign Map
+ *	 This subclass of planet has the addition, that they can be labeled ingame, just like bots are in a level gameplay (As it would be nice to see which level you can play) 
+ *	 
+ */
+
+#include "StoryModePlanet.h"
+
+namespace orxonox
+{
+    RegisterClass(StoryModePlanet);
+
+
+    StoryModePlanet::StoryModePlanet(Context* context) : StaticEntity(context)
+    {
+        RegisterObject(StoryModePlanet);
+    }
+
+    StoryModePlanet::~StoryModePlanet()
+    {
+    }
+
+    void StoryModePlanet::XMLPort(Element& xmlelement, XMLPort::Mode mode){
+        SUPER(StoryModePlanet, XMLPort, xmlelement, mode);
+        XMLPortParam(StoryModePlanet, "levelName", setLevelName, getLevelName, xmlelement, mode);
+    }
+}
\ No newline at end of file

Added: code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.h
===================================================================
--- code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.h	                        (rev 0)
+++ code/branches/CampaignMap_HS17/src/orxonox/worldentities/StoryModePlanet.h	2017-11-06 15:40:56 UTC (rev 11545)
@@ -0,0 +1,36 @@
+/*
+*This is the header of the StoryModePlanet.cc file
+*In this file we define a constructor, destructor and additional function (which is important to name a planet)
+*
+*Author: Bolt Nikole
+*Co-Author: Fanconi Claudio
+*
+*/
+
+#ifndef _StoryModePlanet_H__
+#define _StoryModePlanet_H__
+
+#include "core/CoreIncludes.h"
+#include "core/XMLPort.h"
+#include "worldentities/StaticEntity.h"
+
+namespace orxonox
+{ 
+    class _OrxonoxExport StoryModePlanet : public StaticEntity
+    {
+    	public:
+    		StoryModePlanet(Context* context);
+    		virtual ~StoryModePlanet();
+            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
+
+            inline void setLevelName(const std::string& levelname)
+                { this->levelName_ = levelname; }
+
+            inline const std::string& getLevelName()
+                { return this->levelName_; }
+
+        private:
+            std::string levelName_;
+    };
+}
+#endif
\ No newline at end of file



More information about the Orxonox-commit mailing list