示例#1
0
 void FireEventDebugLog(KoreographyEvent koreoEvent)
 {
     EventFrame = Time.frameCount;
     Go.SetActive(true);
     Go2.SetActive(true);
     //if KoreographyColor is true, check color is equal to the color value of the koreography event.
     //If not, check color is red.
     if (KoreographyColor == true)
     {
         // Debug.Log(Check.GetComponent<SpriteRenderer>().color);
         Check.GetComponent <SpriteRenderer>().color = koreoEvent.GetColorValue();
         // Debug.Log("Koreography Event Fired: " + koreoEvent.StartSample);
         // Debug.Log(koreoEvent.GetColorValue());
         //  Debug.Log(Check.GetComponent<SpriteRenderer>().color);
         // Debug.Log("");
     }
     else
     {
         Check.GetComponent <SpriteRenderer>().color = Color.red;
     }
     if (KoreographyColor2 == true)
     {
         //Debug.Log(Check.GetComponent<SpriteRenderer>().color);
         Check2.GetComponent <SpriteRenderer>().color = koreoEvent.GetColorValue();
         // Debug.Log("Koreography Event Fired: " + koreoEvent.StartSample);
         //  Debug.Log(koreoEvent.GetColorValue());
         // Debug.Log(Check.GetComponent<SpriteRenderer>().color);
     }
     else
     {
         Check2.GetComponent <SpriteRenderer>().color = Color.red;
     }
 }
示例#2
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);
     }
 }
示例#5
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);
     }
 }