Exemplo n.º 1
0
        protected override void UpdateInput()
        {
            if (IsInputDown())
            {
                start = new Vector2(Input.mousePosition.x, Input.mousePosition.y);
                down  = true;
                return;
            }

            if (down && IsInputUp())
            {
                down = false;

                Vector2 end   = new Vector2(Input.mousePosition.x, Input.mousePosition.y);
                Vector2 swipe = end - start;

                float ax = Mathf.Abs(swipe.x);
                if (ax > MinSwipeLength)
                {
                    if (swipe.x > 0.0F)
                    {
                        themeController.NextTheme();
                        return;
                    }
                    if (swipe.x < 0.0F)
                    {
                        themeController.PrevTheme();
                        return;
                    }
                }
            }
        }
Exemplo n.º 2
0
        protected override void UpdateInput()
        {
            if (Input.GetKeyDown(KeyCode.LeftArrow))
            {
                themeController.PrevTheme();
                return;
            }

            if (Input.GetKeyDown(KeyCode.RightArrow))
            {
                themeController.NextTheme();
                return;
            }
        }