본문 바로가기

개인프로젝트/리듬게임만들기

[내가 만든 프로젝트 코드 분석 | 리듬게임 만들기] 12.개별게임 곡 재생하기

private String titleName; // 현재 실행 곡 이름
	private String difficulty; // 난이도 설정
	private String musicTitle; // 음악제목 생성
	private Music gameMusic; // 게임뮤직 생성
	
	public Game(String titleName, String difficulty, String musicTitle) { 
	// 변수 초기화 및 생성자
		this.titleName = titleName;
		this.difficulty = difficulty;
		this.musicTitle = musicTitle;
		gameMusic = new Music(this.musicTitle, false);
		gameMusic.start();
	}
public class Track {

                                  .
                                  .생략
                                  .
	private String titleName; // 곡 제목 
	
                                  .
                                  .생략
                                  .

	public String getTitleName() {
		return titleName;
	}
	public void setTitleName(String titleName) {
		this.titleName = titleName;
	}
	public Track(String titleImage, String startImage, String gameImage, String startMusic, String gameMusic, String titleName) {
		super();
                                  .
                                  .생략
                                  .
		this.titleName = titleName;  
	}
	
}