 
 void CleanupScene()
 {
-	//For each drone node in the scene delete the node sprite associated with it and also remove the node
-	Array<Node@> droneNodes = scene_.GetChildrenWithScript("DroneObject",true);
-	for(uint i=0; i < droneNodes.length ; i++)
-	{
-		Node@ droneNode = droneNodes[i];
-		Sprite@ nodeSprite = droneNode.vars["Sprite"].GetPtr();
-		nodeSprite.Remove();
-		droneNode.Remove();
-	}
-	
-	//Cleanup any bullet still remaining in the scene
-	Array<Node@> bulletNodes = scene_.GetChildrenWithScript("BulletObject", true);
-	for(uint i = 0; i < bulletNodes.length; i++)
-	{
-		bulletNodes[i].Remove();
-	}
-	
-	//Cleanup any explosion still remaining in the scene
-	Array<Node@> explosionNodes = scene_.GetChildrenWithScript("ExplosionObject", true);
-	for(uint i = 0; i < explosionNodes.length; i++)
-	{
-		explosionNodes[i].Remove();
-	}
-	
-	//Remove the player Node
-	playerNode_.Remove();
+	//Remove All Nodes with script object : Drones, Bullets and even the player
+	Array<Node@> scriptedNodes = scene_.GetChildrenWithScript("DroneObject",true);
+	for(uint i=0; i < scriptedNodes.length ; i++)
+	{
+		Node@ scriptNode = scriptedNodes[i];
+		Sprite@ nodeSprite = scriptNode.vars["Sprite"].GetPtr();
+		
+		if(nodeSprite !is null)
+		{
+			nodeSprite.Remove();
+		}
+		
+		scriptNode.Remove();
+	}
 	
 	
 	//Hide the enemy counter and player score texts
 	enemyCounterText_.text = "";
 	playerScoreText_.text = "";
+	
+	
 	
 	
 }

	}
	

}

void HandlePlayerHit(StringHash eventType, VariantMap& eventData)

	float xOffSet = 0.3f * (first ? 1 : -1);
	pNode.Translate(Vector3(xOffSet,-0.2,0));
	
	pNode.CreateScriptObject(scriptFile, "LowLevelBullet");
}


