[Orxonox-commit 6010] r10669 - in code/branches/explosionChunksHS15: data/levels data/levels/templates src/orxonox/worldentities src/orxonox/worldentities/pawns

vaydin at orxonox.net vaydin at orxonox.net
Mon Oct 19 16:00:01 CEST 2015


Author: vaydin
Date: 2015-10-19 16:00:00 +0200 (Mon, 19 Oct 2015)
New Revision: 10669

Added:
   code/branches/explosionChunksHS15/src/orxonox/worldentities/VaydinExplosion.cc
   code/branches/explosionChunksHS15/src/orxonox/worldentities/VaydinExplosion.h
Modified:
   code/branches/explosionChunksHS15/data/levels/emptyLevel.oxw
   code/branches/explosionChunksHS15/data/levels/templates/spaceshipAssff.oxt
   code/branches/explosionChunksHS15/data/levels/templates/spaceshipEscort.oxt
   code/branches/explosionChunksHS15/src/orxonox/worldentities/BigExplosion.cc
   code/branches/explosionChunksHS15/src/orxonox/worldentities/CMakeLists.txt
   code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc
Log:
created new explosion class

Modified: code/branches/explosionChunksHS15/data/levels/emptyLevel.oxw
===================================================================
--- code/branches/explosionChunksHS15/data/levels/emptyLevel.oxw	2015-10-19 13:59:23 UTC (rev 10668)
+++ code/branches/explosionChunksHS15/data/levels/emptyLevel.oxw	2015-10-19 14:00:00 UTC (rev 10669)
@@ -12,11 +12,8 @@
 ?>
 
 <?lua
-  include("templates/spaceshipAssff2.oxt")
-  include("templates/spaceshipPirate.oxt")
+  include("templates/spaceshipAssff.oxt")
   include("templates/spaceshipEscort.oxt")
-  include("templates/spaceshipRing.oxt")
-  include("templates/spaceshipSwallow.oxt")
 ?>
 
 <Level>
@@ -32,6 +29,32 @@
 
     <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 />
+
+    <SpaceShip
+        team                = "1"
+        position            = "1000,0,0"
+   explosionchunks        = 60
+        >
+        <templates>
+                      <Template link=spaceshipassff />
+                    </templates>
+    </SpaceShip>
+    <SpaceShip
+        team                = "1"
+        position            = "1000,200,0"
+        >
+        <templates>
+                      <Template link=spaceshipassff />
+                    </templates>
+    </SpaceShip>
+    <SpaceShip
+        team                = "1"
+        position            = "1000,400,0"
+        >
+        <templates>
+                      <Template link=spaceshipassff />
+                    </templates>
+    </SpaceShip>
     
   </Scene>
 </Level>

Modified: code/branches/explosionChunksHS15/data/levels/templates/spaceshipAssff.oxt
===================================================================
--- code/branches/explosionChunksHS15/data/levels/templates/spaceshipAssff.oxt	2015-10-19 13:59:23 UTC (rev 10668)
+++ code/branches/explosionChunksHS15/data/levels/templates/spaceshipAssff.oxt	2015-10-19 14:00:00 UTC (rev 10669)
@@ -4,7 +4,6 @@
    camerapositiontemplate = spaceshipassffcameras
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
-   explosionchunks        = 6
 
    health            = 100
    maxhealth         = 200

Modified: code/branches/explosionChunksHS15/data/levels/templates/spaceshipEscort.oxt
===================================================================
--- code/branches/explosionChunksHS15/data/levels/templates/spaceshipEscort.oxt	2015-10-19 13:59:23 UTC (rev 10668)
+++ code/branches/explosionChunksHS15/data/levels/templates/spaceshipEscort.oxt	2015-10-19 14:00:00 UTC (rev 10669)
@@ -4,7 +4,7 @@
    camerapositiontemplate = spaceshipescortcameras
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
-   explosionchunks        = 4
+   explosionchunks        = 40
 
    health            = 80
    maxhealth         = 200

Modified: code/branches/explosionChunksHS15/src/orxonox/worldentities/BigExplosion.cc
===================================================================
--- code/branches/explosionChunksHS15/src/orxonox/worldentities/BigExplosion.cc	2015-10-19 13:59:23 UTC (rev 10668)
+++ code/branches/explosionChunksHS15/src/orxonox/worldentities/BigExplosion.cc	2015-10-19 14:00:00 UTC (rev 10669)
@@ -79,6 +79,9 @@
 
     void BigExplosion::init()
     {
+
+        orxout() << "BigExplosion" << endl;
+
         this->debrisEntity1_ = new MovableEntity(this->getContext());
         this->debrisEntity2_ = new MovableEntity(this->getContext());
         this->debrisEntity3_ = new MovableEntity(this->getContext());

Modified: code/branches/explosionChunksHS15/src/orxonox/worldentities/CMakeLists.txt
===================================================================
--- code/branches/explosionChunksHS15/src/orxonox/worldentities/CMakeLists.txt	2015-10-19 13:59:23 UTC (rev 10668)
+++ code/branches/explosionChunksHS15/src/orxonox/worldentities/CMakeLists.txt	2015-10-19 14:00:00 UTC (rev 10669)
@@ -11,6 +11,7 @@
   CameraPosition.cc
   SpawnPoint.cc
   TeamSpawnPoint.cc
+  VaydinExplosion.cc
 )
 
 ADD_SUBDIRECTORY(pawns)

Added: code/branches/explosionChunksHS15/src/orxonox/worldentities/VaydinExplosion.cc
===================================================================
--- code/branches/explosionChunksHS15/src/orxonox/worldentities/VaydinExplosion.cc	                        (rev 0)
+++ code/branches/explosionChunksHS15/src/orxonox/worldentities/VaydinExplosion.cc	2015-10-19 14:00:00 UTC (rev 10669)
@@ -0,0 +1,114 @@
+/*
+ *   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:
+ *      Vedat Aydin
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#include "VaydinExplosion.h"
+
+#include "util/Exception.h"
+#include "core/CoreIncludes.h"
+#include "core/GameMode.h"
+#include "core/command/Executor.h"
+#include "tools/ParticleInterface.h"
+#include "Scene.h"
+#include "graphics/ParticleSpawner.h"
+#include "graphics/Model.h"
+#include "MovableEntity.h"
+
+
+namespace orxonox
+{
+	RegisterClass(VaydinExplosion);
+
+	VaydinExplosion::VaydinExplosion(Context* context) : MovableEntity(context)
+	{
+		RegisterObject(VaydinExplosion);
+
+		meshList_.clear();
+
+		/*if ( GameMode::showsGraphics() && ( !this->getScene() || !this->getScene()->getSceneManager() ) )
+            ThrowException(AbortLoading, "Can't create VaydinExplosion, no scene or no scene manager given.");
+
+        this->bStop_ = false;
+        this->LOD_ = LODParticle::Normal;
+
+        if ( GameMode::showsGraphics() )
+        {
+
+        	try
+            {
+                
+            }
+            catch (const std::exception& ex)
+            {
+                orxout(internal_error) << "Couldn't load particle effect in VaydinExplosion: " << ex.what() << endl;
+                //this->initZero();
+            }
+            
+        }
+
+        else
+        {
+            
+        }
+
+        if (GameMode::isMaster())
+        {
+
+            this->destroyTimer_.setTimer(rnd(2, 4), false, createExecutor(createFunctor(&VaydinExplosion::stop, this)));
+
+        }*/
+
+        this->registerVariables();
+
+	}
+
+
+
+	void VaydinExplosion::XMLPort(Element& xmlelement, XMLPort::Mode mode)
+    {
+        SUPER(VaydinExplosion, XMLPort, xmlelement, mode);
+
+        XMLPortParam(VaydinExplosion, "mesh", setMesh, getMesh, xmlelement, mode);
+        
+    }
+
+
+    void VaydinExplosion::setMesh(&std::string newString)
+    {
+    	this->
+    }
+
+    &std::string VaydinExplosion::getMesh()
+    {}
+
+
+
+
+
+
+}
\ No newline at end of file

Added: code/branches/explosionChunksHS15/src/orxonox/worldentities/VaydinExplosion.h
===================================================================
--- code/branches/explosionChunksHS15/src/orxonox/worldentities/VaydinExplosion.h	                        (rev 0)
+++ code/branches/explosionChunksHS15/src/orxonox/worldentities/VaydinExplosion.h	2015-10-19 14:00:00 UTC (rev 10669)
@@ -0,0 +1,56 @@
+/*
+ *   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:
+ *      Vedat Aydin
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _VaydinExplosion_H__
+#define _VaydinExplosion_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include "tools/Timer.h"
+#include "MovableEntity.h"
+
+
+ namespace orxonox
+{
+    class _OrxonoxExport VaydinExplosion : public MovableEntity
+    {
+        public:
+            VaydinExplosion(Context* context);
+            void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+         
+
+        private:
+        	std::vector<std::string> meshList_;
+        	void setMesh(&std::string newString);
+        	&std::string getMesh();
+            
+    };
+}
+
+
+#endif /* _VaydinExplosion_H__ */
\ No newline at end of file

Modified: code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc
===================================================================
--- code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc	2015-10-19 13:59:23 UTC (rev 10668)
+++ code/branches/explosionChunksHS15/src/orxonox/worldentities/pawns/Pawn.cc	2015-10-19 14:00:00 UTC (rev 10669)
@@ -41,6 +41,7 @@
 #include "graphics/ParticleSpawner.h"
 #include "worldentities/ExplosionChunk.h"
 #include "worldentities/BigExplosion.h"
+//#include "worldentities/VaydinExplosion.h"
 #include "weaponsystem/WeaponSystem.h"
 #include "weaponsystem/WeaponSlot.h"
 #include "weaponsystem/WeaponPack.h"
@@ -142,6 +143,8 @@
         XMLPortObject(Pawn, WeaponSet, "weaponsets", addWeaponSet, getWeaponSet, xmlelement, mode);
         XMLPortObject(Pawn, WeaponPack, "weapons", addWeaponPackXML, getWeaponPack, xmlelement, mode);
 
+        //XMLPortObject(Pawn, VaydinExplosion, "vaydinexplosion", addVaydinExplosion, getVaydinExplosion, xmlelement, mode);
+
         XMLPortParam(Pawn, "reloadrate", setReloadRate, getReloadRate, xmlelement, mode).defaultValues(0);
         XMLPortParam(Pawn, "reloadwaittime", setReloadWaitTime, getReloadWaitTime, xmlelement, mode).defaultValues(1.0f);
 
@@ -164,6 +167,7 @@
 
     void Pawn::tick(float dt)
     {
+        //BigExplosion* chunk = new BigExplosion(this->getContext());
         SUPER(Pawn, tick, dt);
 
         this->bReload_ = false;
@@ -374,6 +378,9 @@
     }
     void Pawn::goWithStyle()
     {
+        orxout() << "gowithstyle" << endl;
+
+
         this->bAlive_ = false;
         this->setDestroyWhenPlayerLeft(false);
 
@@ -386,6 +393,7 @@
     }
     void Pawn::deatheffect()
     {
+        orxout() << "deatheffect" << endl;
         // play death effect
         /*{
             ParticleSpawner* effect = new ParticleSpawner(this->getContext());




More information about the Orxonox-commit mailing list