Index: /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.cc
===================================================================
--- /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.cc	(revision 10407)
+++ /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.cc	(revision 10408)
@@ -108,4 +108,5 @@
         }*/
 
+        //Timer for the waves (10 seconds between the waves)
         selecter = NULL;
         this->player_ = NULL;        
@@ -117,6 +118,6 @@
         this->credit_ = 0;
         this->lifes_ = 0;
-
-        //this->stats_ = new TowerDefensePlayerStats();
+        this->timeSetTower_ = 0;
+
 
         ModifyConsoleCommand(__CC_addTower_name).setObject(this);
@@ -222,5 +223,5 @@
             en1->addTemplate("enemytowerdefense1");
             en1->setScale(3);
-            en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
+            en1->setHealth(en1->getHealth() +50 + this->getWaveNumber()*4);
             break;
 
@@ -228,5 +229,5 @@
             en1->addTemplate("enemytowerdefense2");
             en1->setScale(2);
-            en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
+            en1->setHealth(en1->getHealth() -30 + this->getWaveNumber()*4);
             //  en1->setShieldHealth(en1->getShield() = this->getWaveNumber()*2))
             break;
@@ -235,5 +236,5 @@
             en1->addTemplate("enemytowerdefense3");
             en1->setScale(1);
-            en1->setHealth(en1->getHealth() + this->getWaveNumber()*4);
+            en1->setHealth(en1->getHealth() -10 + this->getWaveNumber()*4);
             break;
         }
@@ -390,13 +391,58 @@
         SUPER(TowerDefense, tick, dt);
         time +=dt;
+        timeSetTower_ +=dt;
+        orxout() << dt << "time" << endl;
+
+        //Check if tower has to be set (because TowerDefenseSelecter asks for it)
+        if(timeSetTower_ >= 0.25)
+        {
+        	timeSetTower_ =0;
+			if(selecter != NULL && selecter->firePressed_)
+			{
+
+				int xcoord = selecter->selectedPos_->GetX();
+				int ycoord = selecter->selectedPos_->GetY();
+				Model* dummyModel2 = new Model(this->center_->getContext());
+
+
+
+				if(towerModelMatrix[xcoord][ycoord] == NULL)
+				{
+					addTower(xcoord,ycoord);
+				}
+				else
+				{
+					if(!((towerModelMatrix [xcoord][ycoord])->getMeshSource() == dummyModel2->getMeshSource()))
+					{
+						towerTurretMatrix[xcoord][ycoord]->upgradeTower();
+					}
+				}
+				selecter->firePressed_ = false;
+			}
+        }
 
         TDCoordinate* coord1 = new TDCoordinate(1,1);
         std::vector<TDCoordinate*> path;
         path.push_back(coord1);
-        if(time>=TowerDefenseEnemyvector.size() && TowerDefenseEnemyvector.size() < 30)
-        {
-            //adds different types of enemys depending on the WaveNumber
-            addTowerDefenseEnemy(path, this->getWaveNumber() % 3 +1 );
-        }
+
+
+        int enemytype = this->getWaveNumber() % 3 +1;
+
+        float randomnumber1 = rand()*100*5;
+        float randomnumber2 = rand()*100*1;
+        float randomnumber3 = rand()*100*1.5;
+
+        float totalnumber = randomnumber1 + randomnumber2 + randomnumber3;
+        int maxspaceships = 30;
+        int spaceships = (int)(maxspaceships* randomnumber1 / totalnumber);
+        int eggs = (int)(maxspaceships*randomnumber2 / totalnumber);
+        int ufos = (int)(maxspaceships*randomnumber3 / totalnumber);
+
+        if(time>=TowerDefenseEnemyvector.size() && TowerDefenseEnemyvector.size() < maxspaceships)
+		{
+			//adds different types of enemys depending on the WaveNumber
+			addTowerDefenseEnemy(path, enemytype);
+		}
+
 
         Vector3* endpoint = new Vector3(500, 700, 150);
Index: /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.h
===================================================================
--- /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.h	(revision 10407)
+++ /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefense.h	(revision 10408)
@@ -99,4 +99,5 @@
         PlayerInfo* player_;
         float time;
+        float timeSetTower_;
 //        float time2;
         int credit_;
Index: /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseSelecter.cc
===================================================================
--- /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseSelecter.cc	(revision 10407)
+++ /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseSelecter.cc	(revision 10408)
@@ -51,5 +51,7 @@
         moveLeftPressed_ = false;
         moveRightPressed_ = false;
-        setSelectedPosition(0,0);     
+        firePressed_ = false;
+        setSelectedPosition(0,0);
+        timerSetFire_=0;
     }
 
@@ -68,51 +70,49 @@
         SUPER(TowerDefenseSelecter, tick, dt);
 
+
         if (hasLocalController())
         {
-            int selecterPosX = selectedPos_->GetX();
-            int selecterPosY = selectedPos_->GetY();
+        	timerSetFire_ +=dt;
 
-            if (moveUpPressed_ == true)
-            {
-                selectedPos_->Set(selecterPosX, selecterPosY + 1);
-                updatePosition();
-                orxout() << "up" << endl;
-            }
-            if (moveDownPressed_ == true)
-            {
-            	selectedPos_->Set(selecterPosX, selecterPosY - 1);
-                updatePosition();
-                orxout() << "Down" << endl;
-            }
+        	if(timerSetFire_ >= 0.25)
+        	{
+        		timerSetFire_ = 0;
 
-            if (moveLeftPressed_ == true)
-            {
-                selectedPos_->Set(selecterPosX - 1, selecterPosY);
-                updatePosition();
-                orxout() << "Left" << endl;
-            }
-            if (moveRightPressed_ == true)
-            {
-            	selectedPos_->Set(selecterPosX + 1, selecterPosY);
-                updatePosition();
-                orxout() << "Right" << endl;
-            }
+        		int selecterPosX = selectedPos_->GetX();
+				int selecterPosY = selectedPos_->GetY();
 
-            /*
-            if (firePressed_ && timeSinceLastFire_ >= maxFireRate_)
-            {
-                firePressed_ = false;
-                timeSinceLastFire_ = 0.0;
-            }
-            */
+				if (moveUpPressed_ == true)
+				{
+					moveUpPressed_ = false;
+					selectedPos_->Set(selecterPosX, selecterPosY + 1);
+					updatePosition();
+				}
+				if (moveDownPressed_ == true)
+				{
+					moveDownPressed_ = false;
+					selectedPos_->Set(selecterPosX, selecterPosY - 1);
+					updatePosition();
+				}
+
+				if (moveLeftPressed_ == true)
+				{
+					moveLeftPressed_ = false;
+					selectedPos_->Set(selecterPosX - 1, selecterPosY);
+					updatePosition();
+				}
+				if (moveRightPressed_ == true)
+				{
+					moveRightPressed_ = false;
+					selectedPos_->Set(selecterPosX + 1, selecterPosY);
+					updatePosition();
+				}
+
+
+			}
+
+
+
         }
-
-        // Reset key variables
-        moveUpPressed_ = false;
-        moveDownPressed_ = false;
-        moveLeftPressed_ = false;
-        moveRightPressed_ = false;
-        //firePressed_ = false;
-    }
+     }
 
 
@@ -157,12 +157,11 @@
     }
 
-    void TowerDefenseSelecter::fire(unsigned int firemode)
+
+    void TowerDefenseSelecter::boost(bool bBoost)
     {
+        firePressed_ = true;
+        orxout() << "boost" << endl;
     }
 
-    void TowerDefenseSelecter::fired(unsigned int firemode)
-    {
-        //firePressed_ = true;
-    }
 
     void TowerDefenseSelecter::updatePosition()
Index: /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseSelecter.h
===================================================================
--- /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseSelecter.h	(revision 10407)
+++ /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseSelecter.h	(revision 10408)
@@ -48,13 +48,14 @@
             virtual void rotatePitch(const Vector2& value);
             virtual void rotateRoll(const Vector2& value);
-            void fire(unsigned int firemode);
-            virtual void fired(unsigned int firemode);
+            virtual void boost(bool bBoost);
             virtual void setSelectedPosition(TDCoordinate* newPos);
             virtual void setSelectedPosition(int x, int y);
+            bool firePressed_;
+            TDCoordinate* selectedPos_;
+
 
         private:            
             virtual void updatePosition();
-            
-            TDCoordinate* selectedPos_;
+            float timerSetFire_;
             bool moveUpPressed_;
             bool moveDownPressed_;
Index: /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseTower.cc
===================================================================
--- /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseTower.cc	(revision 10407)
+++ /code/branches/towerdefenseFS15/src/modules/towerdefense/TowerDefenseTower.cc	(revision 10408)
@@ -66,8 +66,8 @@
             float reloadrate = getReloadRate();
             float reloadwaittime = getReloadWaitTime();
-            this->setDamageMultiplier((upgrade+1)*2);
+            this->setDamageMultiplier((upgrade+1)*1.5);
             this->setRotationThrust(2*this->getRotationThrust());
-            reloadrate = 0.5f*reloadrate;
-            reloadwaittime = 0.5f*reloadwaittime;
+            reloadrate = 0.7f*reloadrate;
+            reloadwaittime = 0.7f*reloadwaittime;
             setReloadRate(reloadrate);
             setReloadWaitTime(reloadwaittime);
