Index: /code/branches/Asteroid_HS17/data/levels/Asteroids2D.oxw
===================================================================
--- /code/branches/Asteroid_HS17/data/levels/Asteroids2D.oxw	(revision 11636)
+++ /code/branches/Asteroid_HS17/data/levels/Asteroids2D.oxw	(revision 11637)
@@ -17,5 +17,5 @@
   include("templates/enemyInvader.oxt")
   include("overlays/Asteroids2DHUD.oxo")
-  include("templates/asteroidsAsteroids2D.oxt)
+  include("templates/asteroidsAsteroids2D.oxt")
 ?>
 
@@ -76,20 +76,4 @@
     ?>-->
 
-
-    <Asteroids2DStone
-      collisionType = dynamic
-      linearDamping = 0.8
-      angularDamping = 1
-      scale= 10
-      enablecollisiondamage = true
-    >
-      <attached>
-        <Model mass= 8000 mesh="ast1.mesh" />
-      </attached>
-      <collisionShapes>
-        <SphereCollisionShape radius="10" />
-      </collisionShapes>
-    </Asteroids2DStone>
-
     <Asteroids2DCenterPoint name=asteroids2Dcenter />
   
Index: /code/branches/Asteroid_HS17/data/levels/templates/asteroidsAsteroids2D.oxt
===================================================================
--- /code/branches/Asteroid_HS17/data/levels/templates/asteroidsAsteroids2D.oxt	(revision 11636)
+++ /code/branches/Asteroid_HS17/data/levels/templates/asteroidsAsteroids2D.oxt	(revision 11637)
@@ -2,6 +2,6 @@
   <Asteroids2DStone
     collisionType = dynamic
-    linearDamping = 0.8
-    angularDamping = 1
+    linearDamping = 0
+    angularDamping = 0
     scale= 10
     enablecollisiondamage = true
@@ -23,6 +23,6 @@
   <Asteroids2DStone
     collisionType = dynamic
-    linearDamping = 0.8
-    angularDamping = 1
+    linearDamping = 0
+    angularDamping = 0
     scale= 20
     enablecollisiondamage = true
@@ -33,5 +33,5 @@
   >
     <attached>
-      <Model mass= 8000 mesh="ast2.mesh" />
+      <Model mass= 8000 mesh="ast1.mesh" />
     </attached>
     <collisionShapes>
@@ -44,6 +44,6 @@
   <Asteroids2DStone
     collisionType = dynamic
-    linearDamping = 0.8
-    angularDamping = 1
+    linearDamping = 0
+    angularDamping = 0
     scale= 30
     enablecollisiondamage = true
@@ -54,5 +54,5 @@
   >
     <attached>
-      <Model mass= 16000 mesh="ast3.mesh" />
+      <Model mass= 16000 mesh="ast1.mesh" />
     </attached>
     <collisionShapes>
Index: /code/branches/Asteroid_HS17/data/levels/templates/spaceshipAsteroids2D.oxt
===================================================================
--- /code/branches/Asteroid_HS17/data/levels/templates/spaceshipAsteroids2D.oxt	(revision 11636)
+++ /code/branches/Asteroid_HS17/data/levels/templates/spaceshipAsteroids2D.oxt	(revision 11637)
@@ -7,7 +7,7 @@
    explosionchunks        = 4
 
-   health            = 40
-   maxhealth         = 40
-   initialhealth     = 40
+   health            = 1000
+   maxhealth         = 1000
+   initialhealth     = 1000
 
    shieldhealth        = 20
Index: /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.cc
===================================================================
--- /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.cc	(revision 11636)
+++ /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.cc	(revision 11637)
@@ -52,5 +52,5 @@
 
         bEndGame = false;
-        lives = 3;
+        lives = 5;
         level = 1;
         point = 0;
@@ -62,5 +62,5 @@
         this->center_ = nullptr;
         this->setHUDTemplate("Asteroids2DHUD");
-        levelupTimer.setTimer(100.0f, true, createExecutor(createFunctor(&Asteroids2D::levelUp, this)));
+        levelupTimer.setTimer(60.0f, true, createExecutor(createFunctor(&Asteroids2D::levelUp, this)));
     }
 
@@ -72,4 +72,6 @@
         if (getPlayer() != nullptr)
         {
+
+            //kann schoener gemacht werden
             for (int i = 0; i < 7; i++)
             {
@@ -84,8 +86,10 @@
             }
         }
-        addPoints(multiplier * 42);
+        addPoints(multiplier * 20);
         multiplier *= 2;
         toggleShowLevel();
         showLevelTimer.setTimer(1.0f, false, createExecutor(createFunctor(&Asteroids2D::toggleShowLevel, this)));
+
+
         //Nach jedem Level Up werden mehr Steine gespawnt -> abhängig vom Schwierigkeitsgrad
         for(int i = 0; i < level*2; i++){
@@ -100,8 +104,10 @@
         if(this->firstTick_)
         {
+            getPlayer();
             for(int i = 0; i < 5; ++i)
             {
                 spawnStone();
             }
+
             this->firstTick_ = false;
         }
@@ -112,6 +118,4 @@
     void Asteroids2D::spawnStone()
     {
-        if (getPlayer() == nullptr)
-            return;
         Asteroids2DStone* newStone = new Asteroids2DStone(this->center_->getContext());
         newStone->setAsteroids2DPlayer(player);
@@ -132,6 +136,4 @@
 
         }
-
-
     }
 
Index: /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.h
===================================================================
--- /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.h	(revision 11636)
+++ /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2D.h	(revision 11637)
@@ -79,4 +79,6 @@
             void levelUp();
 
+
+            //For HUD
             int getLives(){return this->lives;}
             int getLevel(){return this->level;}
@@ -84,12 +86,14 @@
             int getMultiplier(){return this->multiplier;}
 
+            //Generate Stones
             void spawnStone();
             void setCenterpoint(Asteroids2DCenterPoint* center)
-                       { this->center_ = center; }
+                { this->center_ = center; }
+            void addPoints(int numPoints);
             virtual void addBots(unsigned int amount) override{} //<! overwrite function in order to bypass the addbots command
 
             // checks if multiplier should be reset.
             void costLife();
-
+            Asteroids2DShip* getPlayer();
 
             bool bEndGame;
@@ -101,8 +105,7 @@
 
 
-            Asteroids2DShip* getPlayer();
+
             WeakPtr<Asteroids2DShip> player;
             void toggleShowLevel(){bShowLevel = !bShowLevel;}
-            void addPoints(int numPoints);
 
             WeakPtr<Asteroids2DCenterPoint> center_;
Index: /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DHUDinfo.cc
===================================================================
--- /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DHUDinfo.cc	(revision 11636)
+++ /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DHUDinfo.cc	(revision 11637)
@@ -41,5 +41,7 @@
 
         this->Asteroids2DGame = nullptr;
+        this->Ship = nullptr;
         this->bShowPoints_ = true;
+        this->bShowHealth_ = true;
     }
 
@@ -49,4 +51,5 @@
 
         XMLPortParam(Asteroids2DHUDinfo,"showPoints", setShowPoints, getShowPoints, xmlelement, mode).defaultValues(false);
+        XMLPortParam(Asteroids2DHUDinfo,"showHealth", setShowHealth, getShowHealth, xmlelement, mode).defaultValues(false);
     }
 
@@ -74,4 +77,23 @@
             }
         }
+
+        /*if(this->bShowHealth_)
+        {
+            const std::string& health = multi_cast<std::string>(this->Ship->getHealth());
+            if (this->Asteroids2DGame->lives <= 0)
+            {
+                setTextSize(0.2);
+                setPosition(Vector2(0.1, 0.02));
+                this->setCaption("Final score:\n" + health);
+                this->setColour(ColourValue(1, 0, 0, 1));
+            }
+            else
+            {
+                setTextSize(0.04);
+                setPosition(Vector2(0.2, 0.02));
+                this->setColour(ColourValue(1, 1, 1, 1));
+                this->setCaption(health);
+            }
+        }*/
     }
 
@@ -80,7 +102,8 @@
         SUPER(Asteroids2DHUDinfo, changedOwner);
 
-        if (this->getOwner() && this->getOwner()->getGametype())
+        if (this->getOwner() && this->getOwner()->getGametype())//&& this->getOwner->getPlayer())
         {
             this->Asteroids2DGame = orxonox_cast<Asteroids2D*>(this->getOwner()->getGametype());
+            //this->Ship = orxonox_cast<Asteroids2DShip*>(this->getOwner()->getPlayer());
         }
         else
Index: /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DHUDinfo.h
===================================================================
--- /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DHUDinfo.h	(revision 11636)
+++ /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DHUDinfo.h	(revision 11637)
@@ -53,8 +53,15 @@
                 { return this->bShowPoints_; }
 
+            inline void setShowHealth(bool value)
+                { this->bShowHealth_ = value; }
+            inline bool getShowHealth() const
+                { return this->bShowHealth_; }
+
 
         private:
             Asteroids2D* Asteroids2DGame;
+            Asteroids2DShip* Ship;
             bool bShowPoints_;
+            bool bShowHealth_;
     };
 }
Index: /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.cc
===================================================================
--- /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.cc	(revision 11636)
+++ /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.cc	(revision 11637)
@@ -37,4 +37,5 @@
 
 #include "Asteroids2DShip.h"
+#include "Asteroids2DStone.h"
 #include "core/CoreIncludes.h"
 
@@ -89,20 +90,4 @@
     }
 
-/*    void Asteroids2DShip::moveFrontBack(const Vector2& value)
-    {
-        //lastTimeFront = 0;
-        //desiredVelocity.y = value.y * speed * 42;
-        orxout() << "FrontBack" << endl;
-        SUPER(Asteroids2DShip, moveFrontBack, value);
-    }
-
-    void Asteroids2DShip::moveRightLeft(const Vector2& value)
-    {
-        //lastTimeLeft = 0;
-        //desiredVelocity.x = value.x * speed;
-        orxout() << "RightLeft" << endl;
-        SUPER(Asteroids2DShip, moveFrontBack, value);       
-    }
- */
     void Asteroids2DShip::boost(bool bBoost)
     {
@@ -112,7 +97,6 @@
     inline bool Asteroids2DShip::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
     {
-
         removeHealth(100);
-        this->death();
+        getGame()->addPoints(10);
         return false;
     }
Index: /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.h
===================================================================
--- /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.h	(revision 11636)
+++ /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DShip.h	(revision 11637)
@@ -57,8 +57,4 @@
             virtual void tick(float dt) override;
 
-            // overwrite for 2d movement
-            //virtual void moveFrontBack(const Vector2& value) override;
-            //virtual void moveRightLeft(const Vector2& value) override;
-
             // Starts or stops fireing
             virtual void boost(bool bBoost) override;
Index: /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DStone.cc
===================================================================
--- /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DStone.cc	(revision 11636)
+++ /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DStone.cc	(revision 11637)
@@ -44,8 +44,20 @@
     {
         RegisterObject(Asteroids2DStone);
-        this->size = 1;
+        this->size = rand()%3+1;
         this->width = 1043;
         this->height = 646;
         this->setPosition(randomPosition(this->width, this->height));
+        this->setCollisionTypeStr("dynamic");
+        this->setVelocity(randomVelocity(MAX_SPEED));
+    }
+
+    Asteroids2DStone::Asteroids2DStone(Context* c, int sze, Vector3 pos) : Pawn(c)
+    {
+        RegisterObject(Asteroids2DStone);
+        this->size = sze;
+        this->width = 1043;
+        this->height = 646;
+        this->setPosition(pos);
+        this->setCollisionTypeStr("dynamic");
         this->setVelocity(randomVelocity(MAX_SPEED));
     }
@@ -74,12 +86,48 @@
     	SUPER(Asteroids2DStone, tick, dt);
         Vector3 pos = this->getPosition();
-        if(pos.x >= width/2 || pos.x <= -width/2 || pos.z >= height/2 || pos.z <= -height/2)
-        {
-            Quaternion orientation = this->getOrientation();
-            orientation.w -= 180;
-            this->setOrientation(Vector3::UNIT_Y, Degree(orientation.w));
+
+        if(pos.x >= width/2){
+            pos.x = -width/2;
+        }else if(pos.x <= -width/2){
+            pos.x = -width/2;
+        }else if(pos.z >= height/2){
+            pos.z = -height/2;
+        }else if(pos.z <= -height/2){
+            pos.z = -width/2;
         }
 
+        this->setPosition(pos);
+
     }
+
+    inline bool Asteroids2DStone::collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint)
+    {
+        if(orxonox_cast<Asteroids2DShip*>(otherObject))
+        {
+            this->split();
+        }
+        return false;
+    }
+
+    void Asteroids2DStone::split()
+    {
+        if(size == 1)
+        {
+            this->death();
+
+        }else if(size == 2){
+            Asteroids2DStone* newStone1 = new Asteroids2DStone(this->getContext(), 1, this->getPosition());
+            newStone1->addTemplate("stone1");
+            Asteroids2DStone* newStone2 = new Asteroids2DStone(this->getContext(), 1, this->getPosition());
+            newStone2->addTemplate("stone1");
+        }else{
+            Asteroids2DStone* newStone1 = new Asteroids2DStone(this->getContext(), 2, this->getPosition());
+            newStone1->addTemplate("stone1");
+            Asteroids2DStone* newStone2 = new Asteroids2DStone(this->getContext(), 2, this->getPosition());
+            newStone2->addTemplate("stone1");
+        }
+    }
+
+
 
 
Index: /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DStone.h
===================================================================
--- /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DStone.h	(revision 11636)
+++ /code/branches/Asteroid_HS17/src/modules/asteroids2D/Asteroids2DStone.h	(revision 11637)
@@ -48,4 +48,6 @@
        public:
             Asteroids2DStone(Context* context);
+            Asteroids2DStone(Context* c, int sze, Vector3 pos);
+
             virtual void tick(float dt) override;
             Vector3 randomPosition (float maxwidth, float maxheight);
@@ -53,4 +55,6 @@
             void setAsteroids2DPlayer(Asteroids2DShip* player){this->player = player;};
             virtual int getSize(){ return this->size;}
+            virtual bool collidesAgainst(WorldEntity* otherObject, const btCollisionShape* ownCollisionShape, btManifoldPoint& contactPoint) override;
+            virtual void split();
 
        private:
@@ -58,5 +62,6 @@
        		int size;				// three sizes, 3-> two 2s, 2-> two 1s, 1-> die
        		float width, height;	//field
-          float MAX_SPEED = 500;
+          float MAX_SPEED = 100;
+          float delta = 5;
     };
 }
