public static void HandleControlelrNoteWasCut(NoteData noteData, NoteCutInfo noteCutInfo, int multiplayer) { if (player == null) { return; } NoteInfo noteInfo = new NoteInfo(noteData.time, (int)noteData.noteType, (int)noteData.cutDirection); noteInfo.ConvertTime2Measure(180f); AudioTimeSyncController audioTimeSync = Resources.FindObjectsOfTypeAll <AudioTimeSyncController>().FirstOrDefault(); float diffTime = 0; if (audioTimeSync != null) { diffTime = noteData.time - audioTimeSync.songTime; } if (diffTime > 0) { player.PlayScheduled(noteInfo, diffTime); } else { player.Play(noteInfo); } Logger.Write("NoteCut"); Logger.Write(diffTime.ToString()); Logger.Write(noteData.time.ToString()); Logger.Write(noteInfo.time.ToString()); }
public static void HandleControlelrNoteWasMissed(NoteData noteData, int multiplayer) { NoteInfo noteInfo = new NoteInfo(noteData.time, (int)noteData.noteType, (int)noteData.cutDirection); noteInfo.ConvertTime2Measure(180f); Logger.Write("NoteMissed"); Logger.Write(noteData.time.ToString()); Logger.Write(noteInfo.time.ToString()); }