// Update is called once per frame void Update() { timer.Update(Time.deltaTime); if (Input.GetKeyDown("space")) { dance.MarkBeat(); } dance.Update(); drum.Update(); if (readACN.Update()) { penrose.buffer = (Color[])readACN.buffer.Clone(); debugText.text = "ACN source"; } else { if (inTransition) { transitions[currentTransition].V = timer.Value; transitions[currentTransition].Draw(); penrose.buffer = (Color[])transitions[currentTransition].buffer.Clone(); debugText.text = transitions[currentTransition].DebugText(); } else { effects[currentEffect].Draw(); penrose.buffer = (Color[])effects[currentEffect].buffer.Clone(); debugText.text = effects[currentEffect].DebugText(); } drum.Draw(penrose.buffer); } cameraOverlay.Draw(penrose.buffer); debugText.text += $"\nFPS: {fps}"; if (OSCtimer > 0) { debugText.text = OSCtext; OSCtimer--; } sendUDPFrame(penrose.buffer); penrose.UpdateModelColors(); OSCping(); }