public void AnimateFlashHighlight(Color color, float dur, float peakAlpha) { bool isHighlightAlreadyPresent; if (isflashHighlightAnimationRunning) { mainGraphics.StopCoroutine(flashHighlightAnimation); isHighlightAlreadyPresent = true; } else { isHighlightAlreadyPresent = false; } flashHighlightAnimation = mainGraphics.StartCoroutine(CorAnimateFlashHighlight(color, dur, peakAlpha, isHighlightAlreadyPresent)); }