public void update(){
		
		
		
		for(int i = 0; i <= nTestTowers; i++){
			if(testTowers[i] != null) testTowers[i].update(testMobs);
		}
		
		for(int i = 0; i <= nTestMobs; i++ ){
			if(testMobs[i] != null ){
				if(testMobs[i].x > width || testMobs[i].y > height)  testMobs[i] = null;
			}
			
			if(testMobs[i] != null) testMobs[i].update();
		}
		
		//mobs spawn code
		if(allowedToSpawn){
			testMobs[nTestMobs] = new TestMob(SpawnX, SpawnY);
			testMobs[nTestMobs].init(level);
			nTestMobs++;
			allowedToSpawn = false;
		}
		
		if(!allowedToSpawn) spawnTimer++;
		if(spawnTimer >= spawnCount){
			allowedToSpawn = true;
			spawnTimer = 0;
			
			towerMenu.update();
		}
		
		//turrets spawn code
		if(Mouse.clicked()){
			testTowers[nTestTowers] = new TestTower((Mouse.getX() / 96 * 96) / scale, (Mouse.getY() / 96 * 96) / scale);
			towerMenu.setEntity(testTowers[nTestTowers]);//testing
			
			nTestTowers++;
			Mouse.deClick();
			
		}
	}