コード例 #1
0
 // Update is called once per frame
 void Update()
 {
     _timer -= Time.deltaTime;
     if (_timer <= 0f)
     {
         _gallery.NextImage();
         _timer = _delay;
     }
 }
コード例 #2
0
    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();
        }
    }
コード例 #3
0
 void OnNextImage()
 {
     _gallery.NextImage();
 }