public UpgradeShop(Game g,JFrame frame) {
    	game=g;
        upgradeFrame=frame;
        initUpgrades();
        addMouseListener(new MouseListener() {
            @Override
            public void mouseClicked(MouseEvent e) {
                if(mode==1) {
                    for(int i=0;i<items.size();i++){
                    	if(items.get(i).isInside(e.getX(), e.getY())){
                    		upgradePoints=items.get(i).buy(upgradePoints);
                    		repaint();
                    	}
                    }
                }
                
            }

            @Override
            public void mousePressed(MouseEvent e) {
            }

            @Override
            public void mouseReleased(MouseEvent e) {
            }

            @Override
            public void mouseEntered(MouseEvent e) {
                if(mode==0) {
                    mode=1;
                    change=true;
                }
            }

            @Override
            public void mouseExited(MouseEvent e) {
                if(mode==1) {
                    mode=0;
                    change=true;
                }
            }
        });;
    }