public void collisionDetect(){
		meleeHit=false;
		theEnemies = new CopyOnWriteArrayList<Enemy>(enemylist);
		for(Enemy e:theEnemies){
			e.updateBounds();
			if(e.enemyBounds.intersects(player.playerBounds)){
				if(e.countToNextAttack ==0){
					e.canAttack = true;
				}
				if(e.canAttack){
					e.dealDamage();
					SpecialEffect se = new SpecialEffect(2);
					se.setPos(player.getX()/32, player.getY()/8);
					se.setNotLooping();
					window.activeLevel.specialEffects.add(se);
				}
			}
			if((player.meleeHitDetection(e.posX, e.posY)==true)&&(controls.melee==true)&&(player.meleeReady==true)){
				e.energy = e.energy - 8;
				SpecialEffect se = new SpecialEffect(2);
				se.setPos(e.getX()/32, e.getY()/8);
				se.setNotLooping();
				window.activeLevel.specialEffects.add(se);
				panel.actionMessages.add(new ActionMessage(panel,"Enemy hit"));
				meleeHit=true;
			}
		}
		if(meleeHit==true){
			 player.meleeReset();
		}
	}