Index: /code/branches/TowerDefense_HS18/data/levels/towerDefense.oxw
===================================================================
--- /code/branches/TowerDefense_HS18/data/levels/towerDefense.oxw	(revision 12124)
+++ /code/branches/TowerDefense_HS18/data/levels/towerDefense.oxw	(revision 12125)
@@ -23,5 +23,5 @@
   <TowerDefenseSelecter>
     <camerapositions>
-      <CameraPosition position="0,0,1300" lookat="0,0,0" absolute=true drag=true mouselook=true/>
+      <CameraPosition position="0,0,1400" lookat="0,0,0" absolute=true drag=true mouselook=true/>
     </camerapositions>
   </TowerDefenseSelecter>
@@ -301,7 +301,5 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
-    <controller>
-       <WaypointController accuracy = 50/>
-    </controller>
+    <!-- Hier wurde der Controller entfernt-->
   </TowerDefenseEnemy>
 </Template>
@@ -374,7 +372,4 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes> 
-    <controller>
-       <WaypointController accuracy = 50/>
-    </controller>
   </TowerDefenseEnemy>
 </Template>
@@ -447,7 +442,4 @@
       <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
     </collisionShapes>
-    <controller>
-       <WaypointController accuracy = 50/>
-    </controller>
   </TowerDefenseEnemy>
 </Template>
@@ -501,11 +493,11 @@
             F1F1F1I2F1F1F1F1F1F1F1F1F1F1F1F1
             F1F1F1I2F1F1F1F1F1F1F1Y1Y1Y1F1F1
-            F1F1F1R2I3I3I3I3L3F1F1F1F1F1F1F1
-            F1F1F1F1F1F1F1F1I2F1F1F1F1F1F1F1
-            F1F1F1F1F1F1F1F1I2F1F1F1F1F1F1F1
-            X1I1I1I1R0F1F1F1I2F1F1F1F1F1F1F1
-            F1F1F1F1I0F1F1F1I2F1F1F1F1F1F1F1
-            F1F1F1F1I0F1F1F1I2F1F1F1F1F1F1F1
-            F1F1F1F1L1I1I1I1L2F1F1F1F1F1F1F1
+            F1F1F1R2I3I3I3I3I3I3I3L3F1F1F1F1
+            F1F1F1F1F1F1F1F1F1F1F1I2F1F1F1F1
+            F1F1F1F1F1F1F1F1F1F1F1I2F1F1F1F1
+            X1I1I1I1R0F1F1F1F1F1F1I2F1F1F1F1
+            F1F1F1F1I0F1F1F1F1F1F1I2F1F1F1F1
+            F1F1F1F1I0F1F1F1F1F1F1I2F1F1F1F1
+            F1F1F1F1L1I1I1I1I1I1I1L2F1F1F1F1
             F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1
             F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1F1
Index: /code/branches/TowerDefense_HS18/src/modules/towerdefense/CMakeLists.txt
===================================================================
--- /code/branches/TowerDefense_HS18/src/modules/towerdefense/CMakeLists.txt	(revision 12124)
+++ /code/branches/TowerDefense_HS18/src/modules/towerdefense/CMakeLists.txt	(revision 12125)
@@ -10,4 +10,5 @@
   TowerDefenseField.cc
   TDCoordinate.cc
+  TowerDefenseController.cc
 )
 
Index: /code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- /code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefense.cc	(revision 12124)
+++ /code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefense.cc	(revision 12125)
@@ -76,5 +76,5 @@
 #include "TowerDefenseCenterpoint.h"
 #include "worldentities/SpawnPoint.h"
-#include "controllers/WaypointController.h"
+#include "TowerDefenseController.h" //muss ich noch in den richtigen Ordner verschieben
 #include "graphics/Model.h"
 #include "infos/PlayerInfo.h"
@@ -175,7 +175,10 @@
         en1->setTeam(2);
 
-        WaypointController* controller = (WaypointController*)(en1->getXMLController());
-
-        if (controller != nullptr && waypoints_.size() > 1)
+        //Jedem Enemy wird ein eigener Controller uebergeben
+        TowerDefenseController* controller = new TowerDefenseController(this->center_->getContext()); 
+        controller->setControllableEntity(en1);
+        en1->setController(controller);
+
+        if (waypoints_.size() > 1)
         {
             en1->setPosition(waypoints_.at(0)->getPosition() + offset_);
@@ -192,5 +195,6 @@
         }
 
-        enemies_.push_back(en1);
+        auto pair = std::make_pair(orxonox::WeakPtr<TowerDefenseEnemy>(en1), controller);
+        enemies_.push_back(pair);
     }
 
@@ -291,11 +295,17 @@
             }            
         }
+                
         
-        for (std::list<WeakPtr<TowerDefenseEnemy>>::iterator it = enemies_.begin(); it != enemies_.end(); )
-        {
-            if (*it == nullptr)
-            {
-                // the enemy was destroyed by a tower - remove it from the list
-                enemies_.erase(it++);
+        for (EnemyList::iterator it = enemies_.begin(); it != enemies_.end(); )
+        {
+            WeakPtr<TowerDefenseEnemy> enemy = it->first;
+            TowerDefenseController* ctrl = it->second;
+
+            if (enemy == nullptr)
+            {
+
+                // the enemy was destroyed by a tower - remove it from the list AND destroy the corresponding controler
+                ctrl->destroy();
+                it = enemies_.erase(it);
                 addCredit(1);
             }
@@ -303,10 +313,12 @@
             {
                 //if ships are at the end they get destroyed
-                Vector3 ship = (*it)->getRVWorldPosition();
+                Vector3 ship = enemy->getRVWorldPosition();
                 float distance = ship.distance(endpoint_);
                 if(distance < 40)
                 {
-                    (*it)->destroy();
-                    enemies_.erase(it++);
+                    enemy->getController()->destroy();
+                    enemy->destroy();
+
+                    it = enemies_.erase(it);
                     this->reduceLifes(1);
                     if (this->getLifes() == 0)
@@ -412,4 +424,5 @@
         }
 
+        //Falls kein anliegender Weg gefunden wurde.
         delete nextCoord;
         return nullptr;
Index: /code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefense.h
===================================================================
--- /code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefense.h	(revision 12124)
+++ /code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefense.h	(revision 12125)
@@ -32,4 +32,5 @@
 #include "TDCoordinate.h"
 #include "TowerDefenseSelecter.h"
+#include "TowerDefenseController.h"
 #include "towerdefense/TowerDefensePrereqs.h"
 #include "gametypes/TeamDeathmatch.h"
@@ -40,4 +41,6 @@
 namespace orxonox
 {
+    using EnemyList = std::list<std::pair<orxonox::WeakPtr<TowerDefenseEnemy>, TowerDefenseController*>>;
+
     /**
     @brief
@@ -86,5 +89,5 @@
         int waveNumber_;
         int lifes_;
-        std::list<orxonox::WeakPtr<TowerDefenseEnemy>> enemies_;
+        EnemyList enemies_;
         TowerDefenseField* fields_[16][16];
         std::vector<orxonox::WeakPtr<TowerDefenseField>> waypoints_;
Index: /code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefenseEnemy.cc
===================================================================
--- /code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 12124)
+++ /code/branches/TowerDefense_HS18/src/modules/towerdefense/TowerDefenseEnemy.cc	(revision 12125)
@@ -29,5 +29,4 @@
     TowerDefenseEnemy::~TowerDefenseEnemy()
     {
-
     }
 
