Beispiel #1
0
    private void FixedUpdate()
    {
        inputValue = inputSource.GetInput();

        switch (animationType)
        {
        case AnimationType.Translate:

            drivingVector = SetTranslationalDriverVector();

            transform.localPosition = drivingVector;

            break;

        case AnimationType.Rotate:

            drivingVector = SetRotationalDriverVector();

            transform.localRotation = Quaternion.Euler(drivingVector);
            break;

        case AnimationType.Scale:

            drivingVector = SetScalingDriverVector();

            transform.localScale = drivingVector;
            break;
        }
    }
 IEnumerator PollMidiData()
 {
     while (isActive)
     {
         if (muteTrigger != null)
         {
             if (muteTrigger.GetInput() > 0.0f)
             {
                 inputCache = startingValue;
                 yield return(pollingDelay);
             }
             else
             {
                 inputCache = MidiMaster.GetKnob(midiChannel, CCValue, startingValue);
                 yield return(pollingDelay);
             }
         }
         else
         {
             inputCache = MidiMaster.GetKnob(midiChannel, CCValue, startingValue);
             yield return(pollingDelay);
         }
     }
 }