Index: code/branches/towerdefenseHS14/data/levels/templates/tower.oxt
===================================================================
--- code/branches/towerdefenseHS14/data/levels/templates/tower.oxt	(revision 10139)
+++ code/branches/towerdefenseHS14/data/levels/templates/tower.oxt	(revision 10140)
@@ -9,5 +9,5 @@
 
    collisionType     = "dynamic"
-   team = 2
+   team = 0
 
 
Index: code/branches/towerdefenseHS14/data/levels/towerDefense.oxw
===================================================================
--- code/branches/towerdefenseHS14/data/levels/towerDefense.oxw	(revision 10139)
+++ code/branches/towerdefenseHS14/data/levels/towerDefense.oxw	(revision 10140)
@@ -21,5 +21,5 @@
   include("templates/spaceshipPirate.oxt")
   include("templates/tower.oxt")
-  include("templates/enemytowerdefense.oxt")
+  include("templates/enemyTowerdefense.oxt")
 ?>
 
Index: code/branches/towerdefenseHS14/data/overlays/towerdefenseHUD.oxo
===================================================================
--- code/branches/towerdefenseHS14/data/overlays/towerdefenseHUD.oxo	(revision 10139)
+++ code/branches/towerdefenseHS14/data/overlays/towerdefenseHUD.oxo	(revision 10140)
@@ -1,6 +1,10 @@
 <Template name="TowerDefenseHUD">
+
+
   <OverlayGroup name="TowerDefenseHUD" scale = "1, 1">
+  
+  
     <OverlayText
-     position  = "0.05, 0.05"
+     position  = "0.83, 0.05"
      pickpoint = "0.0, 0.0"
      font      = "ShareTechMono"
@@ -9,6 +13,70 @@
      align     = "left"
 
-     caption = "Hello World"
+     caption = "Cash:"
     />
+    
+    
+     <TowerDefenseHUDController
+     position  = "0.88, 0.10"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.05
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+		showlives = false
+		showcredits = true
+		showwaves = false
+    />
+    
+        <OverlayText
+     position  = "0.83, 0.22"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.05
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+
+     caption = "Lives:"
+    />
+    
+         <TowerDefenseHUDController
+     position  = "0.88, 0.27"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.05
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+		showlives = true
+		showcredits = false
+		showwaves = false
+    />
+    
+            <OverlayText
+     position  = "0.83, 0.39"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.05
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+
+     caption = "Waves:"
+    />
+    
+         <TowerDefenseHUDController
+     position  = "0.88, 0.44"
+     pickpoint = "0.0, 0.0"
+     font      = "ShareTechMono"
+     textsize  = 0.05
+     colour    = "1.0, 1.0, 1.0, 1.0"
+     align     = "left"
+     	showlives = false
+		showcredits = false
+		showwaves = true
+
+    />
+    
+    
   </OverlayGroup>
 </Template>
+
+
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.cc	(revision 10139)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.cc	(revision 10140)
@@ -130,5 +130,7 @@
 
         Deathmatch::start();
-
+        credits = 5000;
+        life = 20;
+        waves = 0;
         time=0.0;
 
@@ -158,24 +160,9 @@
     // Generates a TowerDefenseEnemy. Uses Template "enemytowerdefense". Sets position at first waypoint of path.
 
-    void TowerDefense::addTowerDefenseEnemy(std::vector<TDCoordinate*> path, int templatenr){
+    void TowerDefense::addTowerDefenseEnemy(std::vector<TDCoordinate*> path){
 
     	TowerDefenseEnemy* en1 = new TowerDefenseEnemy(this->center_->getContext());
-
-    	switch(templatenr)
-    	{
-    	case 1 :
-    		en1->addTemplate("enemytowerdefense1");
-            en1->setScale(3);
-    		break;
-    	case 2 :
-			en1->addTemplate("enemytowerdefense2");
-	        en1->setScale(2);
-			break;
-    	case 3 :
-			en1->addTemplate("enemytowerdefense3");
-	        en1->setScale(1);
-			break;
-    	}
-
+        en1->addTemplate("enemytowerdefense");
+        en1->setScale(3);
         en1->getController();
 
@@ -298,6 +285,5 @@
             if(time>1 && TowerDefenseEnemyvector.size() < 30)
             {
-
-            	addTowerDefenseEnemy(path, rand() %3 +1 );
+            	addTowerDefenseEnemy(path);
             	time = time-1;
             }
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.h
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.h	(revision 10139)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefense.h	(revision 10140)
@@ -56,5 +56,5 @@
         std::vector<TowerDefenseEnemy*> TowerDefenseEnemyvector;
 
-        void addTowerDefenseEnemy(std::vector<TDCoordinate*> path, int templatenr);
+        void addTowerDefenseEnemy(std::vector<TDCoordinate*> path);
         virtual void start(); //<! The function is called when the gametype starts
         virtual void end();
@@ -63,4 +63,7 @@
         //virtual bool playerLeft(PlayerInfo* player);
 
+        int credits;
+        int life;
+        int waves;
         //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
         //virtual void playerScored(PlayerInfo* player, int score);
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.cc
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 10139)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 10140)
@@ -48,5 +48,7 @@
         float distance = ship.distance(*endpoint);
 
+        orxout() << "distance" << distance << endl;
         if(distance <50){
+        	orxout() << "ENEMY KILLED!!!!" << endl;
         	this->destroy(); }
     }
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseHUDController.cc
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseHUDController.cc	(revision 10139)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseHUDController.cc	(revision 10140)
@@ -32,5 +32,4 @@
 #include "util/Convert.h"
 
-
 namespace orxonox
 {
@@ -50,4 +49,13 @@
     {
         SUPER(TowerDefenseHUDController, tick, dt);
+
+        if(showlives == true)
+          this->setCaption(multi_cast<std::string>(this->td->life));
+        else if(showcredits == true)
+          this->setCaption(multi_cast<std::string>(this->td->credits));
+        else if(showwaves == true)
+          this->setCaption(multi_cast<std::string>(this->td->waves));
+
+
     }
 
@@ -55,16 +63,26 @@
     {
         SUPER(TowerDefenseHUDController, XMLPort, xmlelement, mode);
+
+        XMLPortParam(TowerDefenseHUDController, "showlives", setShowlives, getShowlives, xmlelement, mode);
+        XMLPortParam(TowerDefenseHUDController, "showcredits", setShowcredits, getShowcredits, xmlelement, mode);
+        XMLPortParam(TowerDefenseHUDController, "showwaves", setShowwaves, getShowwaves, xmlelement, mode);
+
     }
 
     void TowerDefenseHUDController::changedOwner()
-    {
-        SUPER(TowerDefenseHUDController, changedOwner);
-        /*
-        if (this->getOwner() != NULL && this->getOwner()->getGametype())
-            this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype().get());
-        else
-            this->owner_ = 0;
-        */
-    }
+        {
+            SUPER(TowerDefenseHUDController, changedOwner);
+
+            td = orxonox_cast<TowerDefense*>(this->getOwner()->getGametype().get());
+
+            /*if (this->getOwner() != NULL && this->getOwner()->getGametype())
+            {
+                this->owner_ = orxonox_cast<TowerDefense*>(this->getOwner()->getGametype().get());
+            }
+            else
+            {
+                this->owner_ = NULL;
+            }*/
+        }
 
 }
Index: code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseHUDController.h
===================================================================
--- code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseHUDController.h	(revision 10139)
+++ code/branches/towerdefenseHS14/src/modules/towerdefense/TowerDefenseHUDController.h	(revision 10140)
@@ -42,5 +42,5 @@
 #include "tools/interfaces/Tickable.h"
 #include "overlays/OverlayText.h"
-
+#include "TowerDefense.h"
 
 namespace orxonox
@@ -52,7 +52,29 @@
         virtual ~TowerDefenseHUDController();
 
+
         virtual void tick(float dt);
         virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
         virtual void changedOwner();
+        void setShowlives(bool temp)
+            { this->showlives = temp; }
+        unsigned int getShowlives(void) const
+            { return this->showlives; }
+
+        void setShowcredits(bool temp)
+            { this->showcredits = temp; }
+        unsigned int getShowcredits(void) const
+            { return this->showcredits; }
+
+        void setShowwaves(bool temp)
+            { this->showwaves = temp; }
+        unsigned int getShowwaves(void) const
+            { return this->showwaves; }
+
+    private:
+        TowerDefense* td;
+
+        bool showcredits;
+        bool showlives;
+        bool showwaves;
     };
 }
