void OnMove(MoveRingEvent e) { current += e.direction; while (current >= NbCran) { current -= NbCran; } while (current < 0) { current += NbCran; } if (_coroutine != null) { StopCoroutine(_coroutine); } StartCoroutine(rotateCoroutine(current * 360.0f / NbCran + offset)); /*target = current * 360.0f / NbCran + offset; * * var rot = transform.rotation.eulerAngles; * transform.rotation = Quaternion.Euler(rot.x, current * 360.0f / NbCran, rot.z);*/ }
void OnRingClick(MoveRingEvent e) { if (_disabled) { return; } if (e.direction > 0) { LeftArrowImage.sprite = RingArrowClicked; RightArrowImage.sprite = RingArrowHiden; } else { RightArrowImage.sprite = RingArrowClicked; LeftArrowImage.sprite = RingArrowHiden; } if (_ringCoroutine != null) { StopCoroutine(_ringCoroutine); } StartCoroutine(OffRingCoroutine()); }