/// <summary> /// Pauses editor. /// </summary> public void Pause() { playing = false; active = EditorJudgement.GetLeftClosestIndex(judgements.GetAllJudgements(), audio.time); audio.Pause(); }
void SetCurrentJudgement(EditorJudgement target) { transform.position = new Vector3(target.x, transform.position.y, -8f); audio.time = target.time; dropdown.ChangeDropdownValue(active, target.type); }
/// <summary> /// Set currently active judgement /// </summary> /// <param name="index">Target active judgement.</param> public void SetActiveJudgement(int index) { active = index; EditorJudgement target = judgements.GetAllJudgements()[active]; SetCurrentJudgement(target); }
/// <summary> /// Scroll forward method. /// </summary> public void ScrollForward() { EditorJudgement[] temp = judgements.GetAllJudgements(); if (!playing && temp.Length != 0 & active != temp.Length - 1) { EditorJudgement target = temp[++active]; SetCurrentJudgement(target); if (!scrolling) { scrolling = true; activeJudge.SetActive(true); } } }