protected void checkTargets(){
		if(game.localEntity != null){
			if(game.localEntity.x > x-(width/2)-detectionRadius && game.localEntity.x < x+(width/2)+detectionRadius && game.localEntity.side != side){
				if(game.localEntity.y > y-(height/2)-detectionRadius && game.localEntity.y < y+(height/2)+detectionRadius ){
					if(!entityThroughBlockX(game.localEntity) || seeThroughWalls){
						targetEntity = game.localEntity;
					}
				}
			}
		}
		for(int i = 0; i < game.globalEntity.length; i++){
			if(game.globalEntity[i] != null){
				if(game.globalEntity[i].x > x-(width/2)-detectionRadius && game.globalEntity[i].x < x+(width/2)+detectionRadius && game.globalEntity[i].side != side){
					if(game.globalEntity[i].y > y-(height/2)-detectionRadius && game.globalEntity[i].y < y+(height/2)+detectionRadius ){
						if(!entityThroughBlockX(game.globalEntity[i]) || seeThroughWalls){
							targetEntity = game.globalEntity[i];
						}
					}
				}
			}
		}	
	}