public void hitGold(){
		if((player.posx < gold.x + 50 && player.posx > gold.x)||(player.posx + 50 > gold.x && player.posx + 50 < gold.x + 50)) {
			if((player.posy < gold.y + 50 && player.posy > gold.y)||(player.posy + 50 > gold.y && player.posy + 50 < gold.y + 50)) {
				bar.goldAmount += 1 * upgrades.goldMultiplicator;
				replaceGold = new Thread(){
					public void run(){
						try {
							gold = null;
							Thread.sleep(1000);
						} catch (InterruptedException e) {
							e.printStackTrace();
						}
						gold = new Gold();
					}
				};
				replaceGold.start();
			}
		}
	}