// Update is called once per frame void Update() { _timer -= Time.deltaTime; if (_timer <= 0f) { _gallery.NextImage(); _timer = _delay; } }
void Update() { if (_doSkipScroll) { _timer -= Time.deltaTime; if (_timer <= 0) { _doSkipScroll = false; } else { return; } } var mouseScroll = Vector2.zero; mouseScroll += OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick); mouseScroll += OVRInput.Get(OVRInput.Axis2D.SecondaryThumbstick); _doSkipScroll = mouseScroll.magnitude > 0; if (_doSkipScroll == false) { return; } _timer = 1f; if (mouseScroll.x < 0) { _gallery.PrevImage(); } else if (mouseScroll.x > 0) { _gallery.NextImage(); } }
void OnNextImage() { _gallery.NextImage(); }