IEnumerator WaitAndSwipe() { yield return(new WaitForSeconds(2)); swip.Swipe(); StartCoroutine("WaitAndLower"); }
void Rotate() { if (Time.timeScale == 0f || _notPlaying) { return; } switch (_currentPlatform) { case CurrentPlatform.PC: Vector2 mousePos = Input.mousePosition; _swiper.endPressPos = mousePos; float swipeRotate = _swiper.Swipe(Swiper.DirectionName.Horizontal); swipeRotate = Mathf.Min(Mathf.Abs(swipeRotate), _maxSwiperLength) * (swipeRotate < 0 ? -1 : 1); Vector3 arrowScale = Vector3.one; arrowScale.x = swipeRotate / 100; arrow.localScale = arrowScale; if (swipeRotate == 0) { break; } Vector3 rotate = Vector3.zero; rotate.y = transform.rotation.eulerAngles.y + rotationSpeed * -swipeRotate; transform.rotation = Quaternion.Euler(rotate); break; case CurrentPlatform.Android: break; default: break; } }