private void InitHoldNoteQueue() { KoreographyTrackBase rhythmTrack = playingKoreo.GetTrackByID(eventID[2]); //获取时间轨迹 List <KoreographyEvent> rawHoldEvents = rhythmTrack.GetAllEvents(); //获取所有事件 int clickID = 0; int index = 0; while (index < rawHoldEvents.Count - 1) { string rawText = rawHoldEvents[index].GetTextValue(); List <int> laneData = new TextTok().TokText(rawText); holdNoteInitData temp = new holdNoteInitData(); temp.ID = clickID; clickID++; temp.sPosition = laneOrigins[laneData[0]].position; temp.tPosition = laneTargets[laneData[0]].position; temp.direction = new Vector3(-1, 0, 0); temp.nTime0 = rawHoldEvents[index].StartSample; temp.dTime0 = rawHoldEvents[index].StartSample - GetSpawnSampleOffset(temp.sPosition, laneTargets[laneData[0]].position); temp.nTime1 = rawHoldEvents[index + 1].StartSample; temp.dTime1 = rawHoldEvents[index + 1].StartSample - GetSpawnSampleOffset(temp.sPosition, laneTargets[laneData[0]].position); initHoldNotesDatas.Enqueue(temp); index += 2; } }
private void InitFlipNoteQueue() { KoreographyTrackBase rhythmTrack = playingKoreo.GetTrackByID(eventID[1]); //获取时间轨迹 List <KoreographyEvent> rawClickEvents = rhythmTrack.GetAllEvents(); //获取所有事件 int clickID = 0; foreach (var item in rawClickEvents) { string rawText = item.GetTextValue(); List <int> laneData = new TextTok().TokText(rawText); int index = 0; while (index < laneData.Count - 1) { filpNoteInitData temp = new filpNoteInitData(); temp.ID = clickID; clickID++; temp.sPosition = laneOrigins[laneData[index]].position; temp.tPosition = laneTargets[laneData[index]].position; temp.direction = new Vector3(-1, 0, 0); temp.nTime = item.StartSample; temp.dTime = item.StartSample - GetSpawnSampleOffset(temp.sPosition, laneTargets[laneData[index]].position); switch (laneData[index + 1]) { case 1: temp.aimDir = slideVector.up; break; case 2: temp.aimDir = slideVector.down; break; } index += 2; initFlipNotesDatas.Enqueue(temp); } } }
private void InitClickNoteQueue() { KoreographyTrackBase rhythmTrack = playingKoreo.GetTrackByID(eventID[0]); //获取时间轨迹 List <KoreographyEvent> rawClickEvents = rhythmTrack.GetAllEvents(); //获取所有事件 int clickID = 0; foreach (var item in rawClickEvents) { string rawText = item.GetTextValue(); List <int> laneData = new TextTok().TokText(rawText); foreach (var rawData in laneData) { clickNoteInitData temp = new clickNoteInitData(); temp.ID = clickID; clickID++; temp.sPosition = laneOrigins[rawData].position; temp.tPosition = laneTargets[rawData].position; temp.direction = new Vector3(-1, 0, 0); temp.nTime = item.StartSample; temp.dTime = item.StartSample - GetSpawnSampleOffset(temp.sPosition, laneTargets[rawData].position); initClickNotesDatas.Enqueue(temp); } } }