private void HandleDrawing() { // screen released OR ballTouched event triggers. if (Input.GetMouseButtonUp(0) || ballTouchedEventTriggered) { // adapt curve to end at center of touched ball. if (ballTouchedEventTriggered) { InterpolateLine(); } ballTouchedEventTriggered = false; firstTouchBall = null; currentCursor.BeginLooping(); EventManager.CallLooping(); currentState = State.LOOP_LINE; } // black event triggers. else if (blackEventTriggered) { blackEventTriggered = false; currentCursor.DestroyCursor(); EventManager.CallLevelRestart(); currentState = State.AWAIT_INPUT; } }