public void AutoSwipeLeft(Vector3 from) { var vec = from != Vector3.zero ? (from - Vector3.zero).normalized : Vector3.left; var to = vec * _screenSize; StartCoroutine(MoveCoroutine(from, to, () => ActionSwipedLeft?.Invoke(this))); }
public void AutoSwipeToLeft(Vector3 from) { Vector3 to = new Vector3(-(cachedRect.rect.size.x * 1.5f), from.y, from.z); StartCoroutine(MoveCoroutine(from, to, () => { if (ActionSwipedLeft != null) { ActionSwipedLeft.Invoke(this); } })); }