public void doFrameInGame() {
		checkCollision(PLAYER_ID, ENEMY_ID);
		checkCollision(ENEMY_ID, PLAYER_ID);
		
		//setViewOffset(0, (int) p.y+64-viewWidth()/2, true);
		setViewOffset(0, (int) p.y, true);
		
		for(int i = 0; i < this.waves.size(); i++){
			waves.get(i).update();
		}
		
		for(int i = 0; i < this.waves.size(); i++){
			if(waves.get(i).stopped){waves.remove(i);}
		}
		
		moveObjects(null, 0);
		
		if(t%starFreq==0 && starCount < starMax){
			addStars(16);
		}

		t++;
		
		if (getKey(KeyEvent.VK_R)) {
			this.removeObjects("", 0);
			this.setGameState("Title");
		}
		
		if (this.waves.size() == 0) {
			Vector enemies = this.getObjects(null, ENEMY_ID, false, null);
			levelFinished = true;
		}
	}