示例#1
0
 private void beginHold()
 {
     holdStartTime = Math.Max(Time.Current, HitObject.StartTime);
     Colour = Color4.White;
     if (!holdSample.IsPlaying)
         holdSample.Play();
     holdSample.VolumeTo(1, 300);
 }
示例#2
0
 private void updateSpinningSample(ValueChangedEvent <bool> tracking)
 {
     if (tracking.NewValue)
     {
         spinningSample?.Play();
         spinningSample?.VolumeTo(1, 200);
     }
     else
     {
         spinningSample?.VolumeTo(0, 200).Finally(_ => spinningSample.Stop());
     }
 }
示例#3
0
 private void updateSpinningSample(ValueChangedEvent <bool> tracking)
 {
     if (tracking.NewValue)
     {
         spinningSample?.Play(!spinningSample.IsPlaying);
         spinningSample?.VolumeTo(1, 300);
     }
     else
     {
         spinningSample?.VolumeTo(0, 300).OnComplete(_ => spinningSample.Stop());
     }
 }
示例#4
0
        private void updateSpinningSample(ValueChangedEvent <bool> tracking)
        {
            if (tracking.NewValue)
            {
                if (!spinningSample.IsPlaying)
                {
                    spinningSample.Play();
                }

                spinningSample.VolumeTo(1, 300);
            }
            else
            {
                spinningSample.VolumeTo(0, fade_out_duration);
            }
        }