[Orxonox-commit 5388] r10051 - in code/branches/pickupsFS14: data/levels data/overlays src/modules/jump

fvultier at orxonox.net fvultier at orxonox.net
Thu May 8 16:16:59 CEST 2014


Author: fvultier
Date: 2014-05-08 16:16:59 +0200 (Thu, 08 May 2014)
New Revision: 10051

Added:
   code/branches/pickupsFS14/data/levels/jump.oxw
   code/branches/pickupsFS14/data/overlays/jumpHUD.oxo
Removed:
   code/branches/pickupsFS14/data/levels/Jump.oxw
   code/branches/pickupsFS14/src/modules/jump/JumpCenterPoint.cc
   code/branches/pickupsFS14/src/modules/jump/JumpCenterPoint.h
   code/branches/pickupsFS14/src/modules/jump/JumpShip.cc
   code/branches/pickupsFS14/src/modules/jump/JumpShip.h
Log:
Removed a few more files I don't need anymore


Deleted: code/branches/pickupsFS14/data/levels/Jump.oxw
===================================================================
--- code/branches/pickupsFS14/data/levels/Jump.oxw	2014-05-08 14:14:31 UTC (rev 10050)
+++ code/branches/pickupsFS14/data/levels/Jump.oxw	2014-05-08 14:16:59 UTC (rev 10051)
@@ -1,110 +0,0 @@
-<LevelInfo
- name = "Jump"
- description = "Jump\nTip: Try to keep the multiplier high by avoiding shots and enemies."
- tags = "minigame"
- screenshot = "orxonoxArcade.png"
-/>
-<?lua
-  include("stats.oxo")
-  include("templates/lodInformation.oxt")
-?>
-
-<?lua
-  -- include("templates/spaceshipAssff2.oxt")
-  -- include("templates/spaceshipPirate.oxt") 
-  include("templates/spaceshipJump.oxt")
-  -- include("templates/enemyInvader.oxt")
-  -- include("overlays/InvaderHUD.oxo")
-?>
-
-
-<Level gametype = Jump>
-  <templates>
-    <Template link=lodtemplate_default />
-  </templates>
-  <?lua include("includes/notifications.oxi") ?>
-
-    <!-- ambientlight = "0.8, 0.8, 0.8"
-    skybox       = "Orxonox/Starbox" -->
-  <Scene ambientlight = "0.8, 0.7, 0.4" skybox     = "Orxonox/skyBoxBasic">
-
-  
-    <WorldAmbientSound
-      source="Earth.ogg"
-      looping="true"
-      playOnLoad="true"
-    />
-  
-    <Planet
-      position="0, 0, -2000"
-      scale="1000"
-      collisionType="dynamic"
-      linearDamping="0.8"
-      angularDamping="0"
-      mass="10000000"
-      pitch="0"
-      mesh="planets/muunilinst.mesh"
-      atmosphere="atmosphere1"
-      rotationaxis="1,0,0"
-      rotationrate="1.0"
-      atmospheresize="80.0f"
-      imagesize="1024.0f"
-      collisiondamage = 2
-      enablecollisiondamage = true
-    >
-
-    </Planet>
-
-    <MovableEntity
-      position="0, 0, 500"
-      scale="5"
-      collisionType="dynamic"
-      mass="10000000"
-    >
-      <attached>
-        <Model mesh="Platform01.mesh" />
-      </attached>
-    </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"/> -->
-    <Light type=directional position="1100, 11000, -7000" lookat="0, 0, 0" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
-
-
-
-    <SpawnPoint team=0 position="0,0,0" lookat="0,0,-1" spawnclass=JumpShip pawndesign=spaceshipjump />
-
-
-    <JumpCenterPoint name=jumpcenter />
-
-    
-    <?lua
-      for i = 1, 200, 1 do
-        j = math.random()
-    ?>
-
-    <MovableEntity
-      position = "<?lua print(math.random(-300,300)) ?>,<?lua print(math.random(-250,10000)) ?>,-300>"
-      collisionType = dynamic
-      linearDamping = 0.8
-      angularDamping = 0
-      scale = "10"
-      collisiondamage = 0
-      enablecollisiondamage = no
-
-    >
-      <attached>
-        <Model mass="<?lua print(j * 1000) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
-      </attached>
-
-    </MovableEntity>
-
-    <?lua
-      end
-    ?>
-
-  
-    
-  </Scene>
-</Level>

Added: code/branches/pickupsFS14/data/levels/jump.oxw
===================================================================
--- code/branches/pickupsFS14/data/levels/jump.oxw	                        (rev 0)
+++ code/branches/pickupsFS14/data/levels/jump.oxw	2014-05-08 14:16:59 UTC (rev 10051)
@@ -0,0 +1,272 @@
+<LevelInfo
+ name = "Jump"
+ description = "Jump in space!"
+ tags = "minigame"
+ screenshot = "pong.png"
+/>
+
+<?lua
+  include("HUDTemplates3.oxo")  
+  include("jumpHUD.oxo")
+  include("stats.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<Template name=jumpfigurecameras defaults=0>
+  <JumpFigure>
+    <camerapositions>
+      <CameraPosition position="0,-150,0" absolute=true mouselook=false drag=false lookat="0,0,0"/>
+    </camerapositions>
+  </JumpFigure>
+</Template>
+
+
+
+<Template name=jumpFigureTemplate>
+  <JumpFigure camerapositiontemplate=jumpfigurecameras mouseFactor="100.0">
+    <attached>
+      <Model position="0,0,0" mesh="sphere.mesh" scale=4 />
+    </attached>
+  <!--
+      <controller>
+        <HumanController />
+      </controller>    
+    -->
+  </JumpFigure>
+</Template>
+
+<Template name=jumpProjectileTemplate>
+  <JumpProjectile>
+    <attached>
+      <Model mesh="Projectile.mesh" scale=1.2  pitch=90/>
+      <ParticleEmitter scale=1 pitch=0 roll=0 position="0, 0, 0" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=0.0 />
+    </attached>
+  </JumpProjectile>
+</Template>
+
+<Template name=jumpPlatformStaticTemplate>
+  <JumpPlatformStatic>
+    <attached>
+      <Model mesh="Platform01.mesh" scale=1.2  pitch=90/>
+    </attached>
+  </JumpPlatformStatic>
+</Template>
+
+<Template name=jumpPlatformHMoveTemplate>
+  <JumpPlatformHMove>
+    <attached>
+      <Model mesh="Platform02.mesh" scale=1.2  pitch=90/>
+      <Backlight scale=0.2 colour="0.1, 0.1, 1.0" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />
+    </attached>
+  </JumpPlatformHMove>
+</Template>
+
+<Template name=jumpPlatformVMoveTemplate>
+  <JumpPlatformVMove>
+    <attached>
+      <Model mesh="Platform03.mesh" scale=1.2  pitch=90/>
+      <Backlight scale=0.2 colour="1.0, 1.0, 1.0" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />
+    </attached>
+  </JumpPlatformVMove>
+</Template>
+
+<Template name=jumpPlatformDisappearTemplate>
+  <JumpPlatformDisappear>
+    <attached>
+      <Model mesh="Platform04.mesh" scale=1.2  pitch=90/>
+      <Backlight scale=0.2 colour="0.0, 0.0, 1.0" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />
+            <Backlight scale=0.2 colour="0.0, 1.0, 0.1" width=7 length=500 lifetime=0.3 elements=20 trailmaterial="Trail/backlighttrail" material="Examples/Flare" loop=1 />       
+    </attached>
+  </JumpPlatformDisappear>
+</Template>
+
+<Template name=jumpPlatformTimerTemplate>
+  <JumpPlatformTimer effectPath="Orxonox/BigExplosion1part2" effectStartTime="0.4">
+    <attached>
+      <Model mesh="Platform05.mesh" scale=1.2  pitch=90/>
+      <ParticleEmitter scaled3D="5.0, 1.0, 2.0" pitch=0 roll=0 position="0, 0, -2.0" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=0.0 />
+
+      <!-- <ParticleSpawner name=hiteffect position="0,0,0" source="Orxonox/sparks2" lifetime=0.01 autostart=0 mainstate=spawn /> -->
+    </attached>
+  </JumpPlatformTimer>
+</Template>
+
+<Template name=jumpPlatformFakeTemplate>
+  <JumpPlatformFake>
+    <attached>
+      <Model mesh="Platform06.mesh" scale=1.2  pitch=90/>
+      <ParticleEmitter scale3D="0.2,0.2,0.2" pitch=0 roll=0 position="0, 0, -2.5" source="Orxonox/sparks" lifetime=1.0 loop=1 startdelay=0.0 />
+    </attached>
+  </JumpPlatformFake>
+</Template>
+
+<Template name=jumpPlatformEnemy1Template>
+  <JumpEnemy>
+    <attached>
+      <Model mesh="cube.mesh" scale3D="10.0, 4.0, 4.0"  pitch=90/>
+    </attached>
+  </JumpEnemy>
+</Template>
+
+
+<Level gametype = "Jump">
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <WorldAmbientSound source="Ganymede.ogg" looping="true" playOnLoad="true"/>
+  <JumpBot />
+
+  <Scene ambientlight="1.0, 1.0, 1.0" skybox="Orxonox/skyBoxBasic">
+    <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 position="991.729, -110.11, 435.404" orientation="0.534038, 0.563456, 0.212168, 0.593553" />
+
+    <MovableEntity>
+      <attached>
+        <JumpCenterpoint
+          name=jumpcenter
+          dimension="120,80"
+          sectionLength="100"
+          platformLength="12"
+
+          platformStaticTemplate=jumpPlatformStaticTemplate
+          platformHMoveTemplate=jumpPlatformHMoveTemplate
+          platformVMoveTemplate=jumpPlatformVMoveTemplate
+          platformDisappearTemplate=jumpPlatformDisappearTemplate
+          platformTimerTemplate=jumpPlatformTimerTemplate
+          platformFakeTemplate=jumpPlatformFakeTemplate
+          enemy1Template=jumpPlatformEnemy1Template
+          figureTemplate=jumpFigureTemplate
+          projectileTemplate=jumpProjectileTemplate>
+
+          <attached>
+
+            <Model position="0,0,-1000" mesh="Platform01.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="Platform02.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="Platform03.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="Platform04.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="Platform05.mesh" scale="1" />
+            <Model position="0,0,-1000" mesh="Platform06.mesh" scale="1" />
+
+            <Model position="0,0,-1000" mesh="Projectile.mesh" scale="1" />
+
+            <!--                   
+            <Model position="0,0,60" mesh="cube.mesh" scale3D="105,1,1" />
+            <Model position="0,0,-60" mesh="cube.mesh" scale3D="105,1,1" />            
+            
+            <ParticleSpawner name=scoreeffect_right position="120,0, 45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
+            <ParticleSpawner name=scoreeffect_right position="120,0, 30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
+            <ParticleSpawner name=scoreeffect_right position="120,0, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
+            <ParticleSpawner name=scoreeffect_right position="120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 autostart=0 />
+            <ParticleSpawner name=scoreeffect_right position="120,0,-15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
+            <ParticleSpawner name=scoreeffect_right position="120,0,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
+            <ParticleSpawner name=scoreeffect_right position="120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
+
+            <ParticleSpawner name=scoreeffect_left position="-120,0, 45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
+            <ParticleSpawner name=scoreeffect_left position="-120,0, 30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
+            <ParticleSpawner name=scoreeffect_left position="-120,0, 15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
+            <ParticleSpawner name=scoreeffect_left position="-120,0,  0" source="Orxonox/BigExplosion1part2" lifetime=0.1 autostart=0 />
+            <ParticleSpawner name=scoreeffect_left position="-120,0,-15" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
+            <ParticleSpawner name=scoreeffect_left position="-120,0,-30" source="Orxonox/BigExplosion1part2" lifetime=3.0 autostart=0 />
+            <ParticleSpawner name=scoreeffect_left position="-120,0,-45" source="Orxonox/sparks2" lifetime=0.1 autostart=0 />
+            
+            <?lua
+              for i = 1, 15, 1 do
+            ?>
+              <ParticleSpawner name=scoreeffect_center position="<?lua print(math.random() * 200 - 100) ?>,0,<?lua print(math.random() * 120 - 60) ?>" source="Orxonox/sparks2" lifetime=0.02 autostart=0 startdelay=<?lua print(math.random() * 0.7) ?> />
+            <?lua end ?>
+            -->
+          </attached>
+        </JumpCenterpoint>
+      </attached>
+    </MovableEntity>
+
+    <EventDispatcher>
+      <targets>
+        <EventTarget target=scoreeffect_right />
+        <EventTarget target=scoreeffect_center />
+      </targets>
+      <events>
+        <spawn>
+          <EventFilter>
+            <names>
+              <EventName name=right />
+            </names>
+            <EventListener event=jumpcenter />
+          </EventFilter>
+        </spawn>
+      </events>
+    </EventDispatcher>
+    <EventDispatcher>
+      <targets>
+        <EventTarget target=scoreeffect_left />
+        <EventTarget target=scoreeffect_center />
+      </targets>
+      <events>
+        <spawn>
+          <EventFilter>
+            <names>
+              <EventName name=left />
+            </names>
+            <EventListener event=jumpcenter />
+          </EventFilter>
+        </spawn>
+      </events>
+    </EventDispatcher>
+
+    <?lua
+      dofile("includes/CuboidSpaceStation.lua")
+    ?>
+
+    <StaticEntity pitch=15>
+      <attached>
+        <MovableEntity rotationrate="-4.15786" rotationaxis="0,0,1">
+          <attached>
+            <StaticEntity position="-2500,0,0" yaw=90 pitch=90>
+              <attached>
+                <?lua
+                  createSpaceStationPar(0,2,1,2,1,4,1,50)
+                ?>
+              </attached>
+            </StaticEntity>
+          </attached>
+        </MovableEntity>
+      </attached>
+    </StaticEntity>
+
+    <StaticEntity position="0,1200,-200" yaw=50 pitch=60 roll=45>
+      <attached>
+        <Model scale=10 mesh="Carrier.mesh" />
+        <Model position="0,30,20" scale=10 mesh="pirate.mesh" roll="180" />
+        <Model position="-80,-30,20" scale=10 mesh="pirate.mesh" roll="180" />
+      </attached>
+    </StaticEntity>
+
+    <StaticEntity pitch=70>
+      <attached>
+        <MovableEntity rotationaxis="0,0,1" rotationrate=8.5974>
+          <attached>
+            <StaticEntity yaw=-90 pitch=0 roll=90 position="800,0,0">
+              <attached>
+                <Model position="0,0,0" scale=10 mesh="satellite.mesh" />
+                <MovableEntity position="-4,0,20" velocity="0,0,0" rotationaxis="0,0,1" rotationrate=50>
+                  <attached>
+                    <Model position="0,0,0" scale=10 mesh="satellitedish.mesh"/>
+                  </attached>
+                </MovableEntity>
+                <!--
+                <ParticleEmitter pitch=-135 roll=30 position="-14, 3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
+                <ParticleEmitter pitch=135 roll=30 position="-14, 3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
+                <ParticleEmitter pitch=-45 roll=30 position="-14,-3.5,-2.5" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
+                <ParticleEmitter pitch=45 roll=30 position="-14,-3.5,-9" source="Orxonox/thruster3" lifetime=2.0 loop=1 startdelay=3.0 />
+              -->
+              </attached>
+            </StaticEntity>
+          </attached>
+        </MovableEntity>
+      </attached>
+    </StaticEntity>
+  </Scene>
+</Level>

Added: code/branches/pickupsFS14/data/overlays/jumpHUD.oxo
===================================================================
--- code/branches/pickupsFS14/data/overlays/jumpHUD.oxo	                        (rev 0)
+++ code/branches/pickupsFS14/data/overlays/jumpHUD.oxo	2014-05-08 14:16:59 UTC (rev 10051)
@@ -0,0 +1,26 @@
+<Template name="JumpHUD">
+  <OverlayGroup name="JumpHUD" scale = "1, 1">
+    <JumpScore
+     position  = "0.5, 0.05"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.06
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "center"
+    />
+
+    <!--
+    <OverlayText
+     position  = "0.505, 0.05"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.06
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "center"
+
+     caption   = ":"
+    />
+    -->
+
+  </OverlayGroup>
+</Template>

Deleted: code/branches/pickupsFS14/src/modules/jump/JumpCenterPoint.cc
===================================================================
--- code/branches/pickupsFS14/src/modules/jump/JumpCenterPoint.cc	2014-05-08 14:14:31 UTC (rev 10050)
+++ code/branches/pickupsFS14/src/modules/jump/JumpCenterPoint.cc	2014-05-08 14:16:59 UTC (rev 10051)
@@ -1,74 +0,0 @@
-/*
- *   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:
- *      Florian Zinggeler
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file JumpCenterPoint.cc
-    @brief Implementation of the JumpCenterPoint class.
-*/
-
-#include "JumpCenterPoint.h"
-
-#include "core/CoreIncludes.h"
-
-#include "Jump.h"
-
-namespace orxonox
-{
-    RegisterClass(JumpCenterPoint);
-
-    JumpCenterPoint::JumpCenterPoint(Context* context) : StaticEntity(context)
-    {
-        RegisterObject(JumpCenterPoint);
-
-        this->checkGametype();
-    }
-
-    void JumpCenterPoint::XMLPort(Element& xmlelement, XMLPort::Mode mode)
-    {
-        SUPER(JumpCenterPoint, XMLPort, xmlelement, mode);
-    }
-
-    void JumpCenterPoint::changedGametype()
-    {
-        SUPER(JumpCenterPoint, changedGametype);
-
-        // Check, whether it's still Jump.
-        this->checkGametype();
-    }
-
-    void JumpCenterPoint::checkGametype()
-    {
-        if (this->getGametype() != NULL && this->getGametype()->isA(Class(Jump)))
-        {
-            Jump* jumpGametype = orxonox_cast<Jump*>(this->getGametype().get());
-            jumpGametype->setCenterpoint(this);
-        }
-    }
-
-
-}

Deleted: code/branches/pickupsFS14/src/modules/jump/JumpCenterPoint.h
===================================================================
--- code/branches/pickupsFS14/src/modules/jump/JumpCenterPoint.h	2014-05-08 14:14:31 UTC (rev 10050)
+++ code/branches/pickupsFS14/src/modules/jump/JumpCenterPoint.h	2014-05-08 14:16:59 UTC (rev 10051)
@@ -1,58 +0,0 @@
-/*
- *   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:
- *      Florian Zinggeler
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file JumpCenterPoint.h
-    @brief Declaration of the JumpCenterPoint class.
-    @ingroup Jump
-*/
-
-#ifndef _JumpCenterPoint_H__
-#define _JumpCenterPoint_H__
-
-#include "jump/JumpPrereqs.h"
-
-#include "worldentities/StaticEntity.h"
-
-namespace orxonox
-{
-    class _JumpExport JumpCenterPoint : public StaticEntity
-    {
-        public:
-            JumpCenterPoint(Context* context); //checks whether the gametype is actually Jump.
-
-            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
-
-            virtual void changedGametype(); //!< Is called when the gametype has changed.
-        private:
-            void checkGametype();
-
-    };
-}
-
-#endif /* _JumpCenterPoint_H__ */

Deleted: code/branches/pickupsFS14/src/modules/jump/JumpShip.cc
===================================================================
--- code/branches/pickupsFS14/src/modules/jump/JumpShip.cc	2014-05-08 14:14:31 UTC (rev 10050)
+++ code/branches/pickupsFS14/src/modules/jump/JumpShip.cc	2014-05-08 14:16:59 UTC (rev 10051)
@@ -1,194 +0,0 @@
-/*
- *   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:
- *      Florian Zinggeler
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file JumpShip.cc
-    @brief Implementation of the JumpShip class.
-*/
-
-#include "JumpShip.h"
-
-#include "core/CoreIncludes.h"
-#include "core/XMLPort.h"
-#include "Jump.h"
-
-namespace orxonox
-{
-    RegisterClass(JumpShip);
-
-    JumpShip::JumpShip(Context* context) : SpaceShip(context)
-    {
-        RegisterObject(JumpShip);
-
-        //speed = 500;
-        //isFireing = false;
-        //damping = 10;
-        leftPressed = false;
-        rightPressed = false;
-        upPressed = false;
-        downPressed = false;
-        yVelocity = 0;
-    }
-
-    void JumpShip::tick(float dt)
-    {
-
-
-    	Vector3 movement(0,0,0);
-        Vector3 shipPosition = getPosition();
-
-    	// Berechne Bewegung anhand der Eingabe
-    	if (leftPressed == true)
-    	{
-    		movement -= Vector3(xVelocity, 0, 0);
-    		leftPressed = false;
-    	}
-    	else if (rightPressed == true)
-    	{
-    		movement += Vector3(xVelocity, 0, 0);
-    		rightPressed = false;
-    	}
-
-    	if (upPressed == true)
-    	{
-    		//movement += Vector3(0, xVelocity, 0);
-    		yVelocity = ySpeedAfterJump;
-    		upPressed = false;
-    	}
-    	else if (downPressed == true)
-    	{
-    		movement -= Vector3(0, 0, 0);
-    		downPressed = false;
-    	}
-
-    	movement += Vector3(0, yVelocity, 0);
-    	yVelocity -= yAcceleration;
-
-    	// Skalierung der Bewegung je nach vergangener Zeit
-    	movement *= dt;
-
-    	// Verschiebe das Schiff um den berechneten Vektor movement und verhindere Verlassen des Bildschrims
-    	shipPosition.x = clamp(shipPosition.x + movement.x, -xBoundary, xBoundary);
-		shipPosition.y += movement.y;
-
-    	setPosition(shipPosition);
-
-    	SUPER(JumpShip, tick, dt);
-    }
-/*
-    void JumpShip::updateLevel()
-    {
-        lastTime = 0;
-        if (getGame())
-            getGame()->levelUp();
-    }*/
-
-    void JumpShip::moveFrontBack(const Vector2& value)
-    {
-    	if (value.y < 0)
-    	{
-    		downPressed = true;
-    	}
-    	else if (value.y > 0)
-    	{
-    		upPressed = true;
-    	}
-        //lastTimeLeft = 0;
-        //desiredVelocity.x = -value.x * speed;
-    }
-
-    void JumpShip::moveRightLeft(const Vector2& value)
-    {
-    	if (value.x < 0)
-    	{
-    		leftPressed = true;
-    	}
-    	else if (value.x > 0)
-    	{
-    		rightPressed = true;
-    	}
-        //lastTimeFront = 0;
-        //desiredVelocity.y = value.y * speed * 42;
-    }
-
-    /*
-    void JumpShip::boost(bool bBoost)
-    {
-        isFireing = bBoost;
-    }
-    inline bool JumpShip::collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint)
-    {
-        // orxout() << "touch!!! " << endl; //<< otherObject << " at " << contactPoint;
-        WeakPtr<JumpEnemy> enemy = orxonox_cast<JumpEnemy*>(otherObject);
-        WeakPtr<Projectile> shot = orxonox_cast<Projectile*>(otherObject);
-        // ensure that this gets only called once per enemy.
-        if (enemy != NULL && lastEnemy != enemy)
-        {
-            lastEnemy = enemy;
-
-            removeHealth(20);
-            if (getGame())
-            {
-                getGame()->multiplier = 1;                   
-            }
-        }
-        // was shot, decrease multiplier
-        else if (shot != NULL  && lastShot != shot)
-        {
-            if (getGame() && orxonox_cast<JumpEnemy*>(shot->getShooter()) != NULL)
-            {
-                if (getGame()->multiplier > 1)
-                {
-                    lastShot = shot;
-                    getGame()->multiplier -= 1;     
-                }
-            }
-        }
-        return false;
-        // SUPER(JumpShip, collidesAgainst, otherObject, contactPoint);
-    }
-
-    void JumpShip::death()
-    {
-        getGame()->costLife();
-        SpaceShip::death();
-    }
-*/
-    WeakPtr<Jump> JumpShip::getGame()
-    {
-        if (game == NULL)
-        {
-            for (ObjectList<Jump>::iterator it = ObjectList<Jump>::begin(); it != ObjectList<Jump>::end(); ++it)
-            {
-                game = *it;
-            }
-        }
-        return game;
-    }
-
-}

Deleted: code/branches/pickupsFS14/src/modules/jump/JumpShip.h
===================================================================
--- code/branches/pickupsFS14/src/modules/jump/JumpShip.h	2014-05-08 14:14:31 UTC (rev 10050)
+++ code/branches/pickupsFS14/src/modules/jump/JumpShip.h	2014-05-08 14:16:59 UTC (rev 10051)
@@ -1,107 +0,0 @@
-/*
- *   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:
- *      Florian Zinggeler
- *   Co-authors:
- *      ...
- *
- */
-
-/**
-    @file JumpShip.h
-    @brief Declaration of the JumpShip class.
-*/
-
-#ifndef _JumpShip_H__
-#define _JumpShip_H__
-
-#include "jump/JumpPrereqs.h"
-
-#include "worldentities/pawns/SpaceShip.h"
-#include "graphics/Camera.h"
-#include "weapons/projectiles/Projectile.h"
-#include "JumpPlatform.h"
-
-namespace orxonox
-{
-    class _JumpExport JumpShip : public SpaceShip
-    {
-        public:
-            JumpShip(Context* context);
-
-            virtual void tick(float dt);
-
-            // overwrite for 2d movement
-            virtual void moveFrontBack(const Vector2& value);
-            virtual void moveRightLeft(const Vector2& value);
-/*
-            // Starts or stops fireing
-            virtual void boost(bool bBoost);
-*/
-            //no rotation!
-            virtual void rotateYaw(const Vector2& value){}; 
-            virtual void rotatePitch(const Vector2& value){};
-            //return to main menu if game has ended.
-            virtual void rotateRoll(const Vector2& value){};
-
-            /*virtual void updateLevel();
-
-            virtual inline bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
-
-        protected:
-            virtual void death();*/
-        private:
-            WeakPtr<Jump> getGame();
-            WeakPtr<Jump> game;
-            const float xVelocity = 150.0f;
-            const float xBoundary = 200.0f;
-
-
-            //bool isFireing;
-            //float speed;
-            //float damping
-            //float posforeward;
-            //float lastTimeFront;
-            //float lastTimeLeft;
-            //float lastTime;
-            //WeakPtr<JumpEnemy> lastEnemy;
-            //WeakPtr<Projectile> lastShot;
-
-            /*
-            struct Velocity
-            {
-                float x;
-                float y;
-            } velocity, desiredVelocity;*/
-
-            bool leftPressed;
-            bool rightPressed;
-            bool upPressed;
-            bool downPressed;
-
-            float yVelocity;
-            const float yAcceleration = 10.0f;
-            const float ySpeedAfterJump = 300.0f;
-    };
-}
-
-#endif /* _JumpShip_H__ */




More information about the Orxonox-commit mailing list