private IEnumerator FlickAction(Vector3 pos, Vector3 vec) { Vector3 org = pos - vec; bool isWeak = vec.magnitude < flickDistance; bool isDist = vec.Similarity (st.Vec) < elasticDotSimilarity; bool isShort = st.Vec.magnitude < elasticDistance; if (isWeak || isDist || isShort) { yield break; } Color effectColor = flickColor; StartCoroutine(ripple(org, effectColor)); StartCoroutine(ripple(pos, effectColor)); yield return null; handler.OnFlicked (vec); SetPos (org); SetStretch (vec.magnitude * stretchScale); SetDirection (vec.normalized); SetTargetColor (effectColor); SetTargetAlpha (1f); SetCurrentAlpha (0f); yield return new WaitForSeconds(0.3f); SetTargetColor (Color.white); SetTargetAlpha (0f); }