예제 #1
0
 void PickUpBar()
 {
     state = State.PickUpBar;
     if (pickUpBarCounter > 0)
     {
         if (!onPickupBarBeginFired && OnPickupBarBegin != null)
         {
             OnPickupBarBegin(bar);
             onPickupBarBeginFired = true;
         }
         pickUpBarCounter--;
         TimeKeeper.BeatEvent(timeSignatureNumerator - pickUpBarCounter, timeSignatureNumerator, timeSignatureDenominator);
         pickUpCoroutine = this.FireAction(60f / bars [bar].tempo / (timeSignatureDenominator / 4f) / speed, PickUpBar);
     }
     else
     {
         CancelPickUpBarCounting();
         if (OnPickupBarEnd != null)
         {
             OnPickupBarEnd();
         }
         if (music && audioMusic)
         {
             audioMusic.Play();
         }
         if (vocals && audioVocals)
         {
             audioVocals.Play();
         }
         state = State.Playing;
     }
 }
예제 #2
0
 void CancelPickUpBarCounting()
 {
     if (pickUpCoroutine != null)
     {
         pickUpCoroutine.Kill();
         pickUpCoroutine = null;
     }
 }