int calculateScore(float distance1, float distance2) { Debug.Log(Mathf.Abs(distance1 - distance2)); if (Mathf.Abs(distance1 - distance2) <= perfectRange) { rv.showPerfectResult(); return(100); } else if (Mathf.Abs(distance1 - distance2) <= okRange) { rv.showOKResult(); return(50); } else { return(-50); } }