private void RecordBeat(int beatInSequence, int finger) { if (isRecording && recording[beatInSequence] == 0) { recording[beatInSequence] = finger; RhythmEvents.BeatRecordedEvent(beatInSequence, finger); } }
private void TapRight() { NativeAudioPlayer.Instance.PlaySound(1); beatInSequence = TempoUtils.instance.GetBeatInSequenceAprox(8, beatInSamples); RhythmEvents.TapEventSequencedEvent(beatInSequence, 2); //Debug.Log("RIGHT"); }
private void TapLeft() { NativeAudioPlayer.Instance.PlaySound(0); beatInSequence = TempoUtils.instance.GetBeatInSequenceAprox(8, beatInSamples); RhythmEvents.TapEventSequencedEvent(beatInSequence, 1); //Debug.Log("LEFT " + beatInSequence); }
// This is trigered 1/16th note before full bar void Update() { if ((beatObserver.beatMask & BeatType.OffBeat) == BeatType.OffBeat) { isRecording = !isRecording; if (!isRecording) { // RECORDING COMPLETED SequencePlayer.instance.FilterSequence(recording); RhythmEvents.RecordingCompletedEvent(); } else { // RECORDING STARTED ClearRecording(); RhythmEvents.RecordingStartedEvent(); } } }
// STOP WHILE RECORDING // not using it at the moment private void StopSequence() { RhythmEvents.PlaySequenceStartedEvent(SequenceCollection.HeroAction.Idle); }
//PLAY RECORDED SEQUENCE // sequence last until next time is clled // sequence can be idle or none too private void PlaySequence() { RhythmEvents.PlaySequenceStartedEvent(heroAction); }