Revert "Merge pull request '리듬게임' (#5) from CatsRhythmGame into main"

This reverts commit 58385bf819, reversing
changes made to 8369e2ab51.
This commit is contained in:
skrwns304@gmail.com
2026-06-16 12:23:32 +09:00
parent 58385bf819
commit d7d5519fbf
2320 changed files with 154 additions and 251716 deletions

View File

@@ -3,28 +3,22 @@
public class Note
{
[HideInInspector] public float Time; // 판정 시각(초)
[HideInInspector] public int Lane; // 레인 인덱스 (단일 레인이면 0)
[HideInInspector] public float Time;
}
[CreateAssetMenu(fileName = "RhythmChart", menuName = "CatsRoom/RhythmChart")]
public class RhythmChart : ScriptableObject
{
public AudioClip SongClip; // 노래 파일
public TextAsset MidiFile; // FL Studio에서 내보낸 .mid (확장자를 .bytes로 임포트)
public float Offset; // 곡 시작과 MIDI 0틱 사이 보정(초)
public float BpmOverride; // 0이면 MIDI 내장 템포 사용, >0이면 이 BPM으로 강제
public List<int> LanePitches = new(); // 비우면 모든 노트를 레인 0으로. 채우면 (index=레인) 매핑
// MIDI를 파싱해 노트 시간 목록 생성
public List<Note> GenerateNotes()
public AudioClip SongClip; // 노래 파일
public float Bpm; // 분당 박자
public float Offset; // 첫 박자 시작 시각
public int NoteCount; // 노트 개수 (또는 곡 길이로 자동)
public List<Note> GenerateNotes() // BPM·offset으로 시간 목록 자동 생성
{
if (MidiFile == null)
{
Debug.LogWarning($"[RhythmChart] {name}: MidiFile이 비어 있습니다.");
return new List<Note>();
}
return MidiChartParser.Parse(MidiFile.bytes, Offset, BpmOverride, LanePitches);
List<Note> notes = new List<Note>();
float interval = 60f / Bpm;
for (int i = 0; i < NoteCount; i++)
notes.Add(new Note { Time = Offset + interval * i });
return notes;
}
}