예제 #1
0
 private void RecordBeat(int beatInSequence, int finger)
 {
     if (isRecording && recording[beatInSequence] == 0)
     {
         recording[beatInSequence] = finger;
         RhythmEvents.BeatRecordedEvent(beatInSequence, finger);
     }
 }
예제 #2
0
    private void TapRight()
    {
        NativeAudioPlayer.Instance.PlaySound(1);

        beatInSequence = TempoUtils.instance.GetBeatInSequenceAprox(8, beatInSamples);
        RhythmEvents.TapEventSequencedEvent(beatInSequence, 2);

        //Debug.Log("RIGHT");
    }
예제 #3
0
    private void TapLeft()
    {
        NativeAudioPlayer.Instance.PlaySound(0);

        beatInSequence = TempoUtils.instance.GetBeatInSequenceAprox(8, beatInSamples);
        RhythmEvents.TapEventSequencedEvent(beatInSequence, 1);

        //Debug.Log("LEFT " + beatInSequence);
    }
예제 #4
0
 // 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();
         }
     }
 }
예제 #5
0
 // STOP WHILE RECORDING
 // not using it at the moment
 private void StopSequence()
 {
     RhythmEvents.PlaySequenceStartedEvent(SequenceCollection.HeroAction.Idle);
 }
예제 #6
0
 //PLAY RECORDED SEQUENCE
 // sequence last until next time is clled
 // sequence can be idle or none too
 private void PlaySequence()
 {
     RhythmEvents.PlaySequenceStartedEvent(heroAction);
 }