private void ProcessButton(byte[] input) { //if (!gameInitialized || Game.paused) return; switch (input[0]) { case 16: spawnCtrl.DestroyActiveObject("LS"); break; case 2: float rotationDelta = BitConverter.ToSingle(input, 4); if (rotationDelta >= 320f && !deltaChangeStarted) { deltaChangeStarted = true; } else if (rotationDelta <= 320f && deltaChangeStarted) { deltaChangeStarted = false; spawnCtrl.DestroyActiveObject("DK"); } break; default: break; } Debug.Log(input[0]); }