public boolean DoGatewayCollision()
    {
	for (int i = 0; i < gateways.size(); i++) {
		Object o = gateways.get(i);
		Gateway bo = (Gateway)o;
		if (collision(player.getx()-map.getx(),player.gety()-map.gety(),player.getw(),player.geth(),bo.getx(),bo.gety(),bo.getw(),bo.geth())) {

			currentgateway = bo;

			return true;
		}
	}
	return false;
    }