Example #1
0
    void FireEventDebugLog(KoreographyEvent koreoEvent, int sampleTime, int sampleDelta, DeltaSlice deltaSlice)
    {
        Debug.Log("Koreography Event Fired");

        Debug.Log("Sample Time: " + sampleTime + "\nSample delta: " + sampleDelta + "\nPrevious Frame: " + (sampleTime - sampleDelta));
        if (Input.GetKeyDown(KeyCode.Space))
        {
            Debug.Log("F**K THIS");
            GameObject.Find("Text").GetComponent <Text>().text = "JA THIS MOFO";
        }

        if (koreoEvent.IsOneOff() && koreoEvent.HasColorPayload())
        {
            // This is a simple Color Payload.
            Color targetColor = koreoEvent.GetColorValue();
            ApplyColorToObjects(ref targetColor);
        }
        else if (!koreoEvent.IsOneOff() && koreoEvent.HasGradientPayload())
        {
            // Access the color specified at the current music-time.  This is what
            //  drives musical color animations from gradients!
            Color targetColor = koreoEvent.GetColorOfGradientAtTime(sampleTime);
            ApplyColorToObjects(ref targetColor);
        }

        Color targetColor1 = koreoEvent.GetColorValue();

        ApplyColorToObjects(ref targetColor1);
    }
 private void ChangeColor(KoreographyEvent koreoEvent,
                          int sampleTime,
                          int sampleDelta,
                          DeltaSlice deltaSlice)
 {
     if (koreoEvent.HasColorPayload())
     {
         Color targetColor = koreoEvent.GetColorValue();
         ApplyColorToObjects(targetColor);
     }
     else if (koreoEvent.HasGradientPayload())
     {
         Color targetColor = koreoEvent.GetColorOfGradientAtTime(sampleTime);
         ApplyColorToObjects(targetColor);
     }
 }
 void AdjustColor(KoreographyEvent evt, int sampleTime, int sampleDelta, DeltaSlice deltaSlice)
 {
     // We have prepared two kinds of events that work with this system:
     //  1) OneOffs that store a Color.
     //  2) Spans that store a Gradient.
     // Ensure that we have the correct types before proceeding!
     if (evt.IsOneOff() && evt.HasColorPayload())
     {
         // This is a simple Color Payload.
         Color targetColor = evt.GetColorValue();
         ApplyColorToObjects(ref targetColor);
     }
     else if (!evt.IsOneOff() && evt.HasGradientPayload())
     {
         // Access the color specified at the current music-time.  This is what
         //  drives musical color animations from gradients!
         Color targetColor = evt.GetColorOfGradientAtTime(sampleTime);
         ApplyColorToObjects(ref targetColor);
     }
 }
Example #4
0
 void AdjustColor(KoreographyEvent evt, int sampleTime, int sampleDelta, DeltaSlice deltaSlice)
 {
     // We have prepared two kinds of events that work with this system:
     //  1) OneOffs that store a Color.
     //  2) Spans that store a Gradient.
     // Ensure that we have the correct types before proceeding!
     if (evt.IsOneOff() && evt.HasColorPayload())
     {
         // This is a simple Color Payload.
         Color targetColor = evt.GetColorValue();
         ApplyColorToObjects(ref targetColor);
     }
     else if (!evt.IsOneOff() && evt.HasGradientPayload())
     {
         // Access the color specified at the current music-time.  This is what
         //  drives musical color animations from gradients!
         Color targetColor = evt.GetColorOfGradientAtTime(sampleTime);
         ApplyColorToObjects(ref targetColor);
     }
 }