Example #1
0
        void AdjustScale(KoreographyEvent evt, int sampleTime, int sampleDelta, DeltaSlice deltaSlice)
        {
            if (evt.HasCurvePayload())
            {
                // Get the value of the curve at the current audio position.  This will be a
                //  value between [0, 1] and will be used, below, to interpolate between
                //  minScale and maxScale.
                float curveValue = evt.GetEventDeltaAtSampleTime(sampleTime);

                transform.localScale = Vector3.one * Mathf.Lerp(minScale, maxScale, curveValue);
            }
        }
Example #2
0
        void AdjustScale(KoreographyEvent evt, int sampleTime, int sampleDelta, DeltaSlice deltaSlice)
        {
            if (evt.HasCurvePayload())
            {
                // Get the value of the curve at the current audio position.  This will be a
                //  value between [0, 1] and will be used, below, to interpolate between
                //  minScale and maxScale.
                float curveValue = evt.GetEventDeltaAtSampleTime(sampleTime);

                transform.localScale = Vector3.one * Mathf.Lerp(minScale, maxScale, curveValue);
            }
        }
Example #3
0
        void OnLyricEvent(KoreographyEvent koreoEvt, int sampleTime, int sampleDelta, DeltaSlice slice)
        {
            string lyric = koreoEvt.GetTextValue();

            float percent = koreoEvt.GetEventDeltaAtSampleTime(sampleTime);

            for (int i = 0; i < textLines.Count; ++i)
            {
                KaraokeTextLine curLine = textLines[i];
                if (!curLine.IsLineFull())
                {
                    curLine.FillKaraokeSection(lyric, percent);
                    break;
                }
            }
        }
Example #4
0
 void OnKoreographerTime(KoreographyEvent kevent, int sampleTime, int sampleDelta)
 {
     if (kevent.Payload != null && kevent.Payload as CurvePayload != null)
     {
         SetValue(GetMinMaxValue(rangeMin, rangeMax, (kevent.Payload as CurvePayload).GetValueAtDelta(kevent.GetEventDeltaAtSampleTime(sampleTime))));
     }
 }