Ejemplo n.º 1
0
    public void Exec(float axis)
    {
        if (control == false)
        {
            return;
        }

        currentValue += (axis == -1) ? -1 : 1;
        currentValue  = UIFunctions.RevisionValue(currentValue, max);
    }
Ejemplo n.º 2
0
    // Update is called once per frame
    void Update()
    {
        timer -= Time.deltaTime;

        if (timer < 0)
        {
            currentNum++;
            currentNum       = UIFunctions.RevisionValue(currentNum, textures.Length - 1, UIFunctions.RevisionMode.Loop);
            rawImage.texture = textures[currentNum];
            timer            = interval;
        }
    }
Ejemplo n.º 3
0
    // ------------入力--------------
    public void OnSelect(InputValue value)
    {
        var a = value.Get <Vector2> ();

        if (a.x != 0)
        {
            currentSelect += (a.x == -1) ? -1 : 1;

            currentSelect = UIFunctions.RevisionValue(currentSelect, stars.Length - 1);
            UpdateStarUI(currentSelect);
            SoundManager.Instance.PlaySE(SoundManager.SE.Cursor);
        }
    }
Ejemplo n.º 4
0
    // -------------------入力-------------------
    public void OnSelect(InputValue value)
    {
        var a = value.Get <Vector2> ();

        if (popup.gameObject.activeSelf == true)
        {
            if (a.x != 0)
            {
                popup.CurrentSelect += (a.x == -1) ? -1 : 1;
                popup.CurrentSelect  = UIFunctions.RevisionValue(popup.CurrentSelect, 2);
                SoundManager.Instance.PlaySE(SoundManager.SE.Cursor);
                popup.UpdateUI();
            }
        }
    }
Ejemplo n.º 5
0
    // ----------------入力--------------------
    public void OnSelect(InputValue value)
    {
        var a = value.Get <Vector2> ();

        if (a.y != 0)
        {
            if (showMenu == true)
            {
                currentSelect += (a.y == -1) ? 1 : -1;

                currentSelect = UIFunctions.RevisionValue(currentSelect, menus.Length - 1);
                SoundManager.Instance.PlaySE(SoundManager.SE.Cursor);
                UpdateUI();
            }
        }
    }
Ejemplo n.º 6
0
    // -------------入力----------------------
    public void OnSelect(InputValue value)
    {
        var a = value.Get <Vector2> ();

        if (a.y != 0)
        {
            currentSelect += (a.y == -1) ? 1 : -1;

            currentSelect = UIFunctions.RevisionValue(currentSelect, sliders.Length - 1);
            SoundManager.Instance.PlaySE(SoundManager.SE.Cursor);
            ChangeItem();
        }
        else if (a.x != 0)
        {
            sliders[currentSelect].Exec(a.x);
            SoundManager.Instance.PlaySE(SoundManager.SE.Gauge);
            UpdateSetting();
        }
    }
Ejemplo n.º 7
0
    // -------------------入力-------------------
    public void OnSelect(InputValue value)
    {
        var a = value.Get <Vector2> ();

        if (exitPopup.gameObject.activeSelf == true)
        {
            if (a.x != 0)
            {
                exitPopup.CurrentSelect += (a.x == -1) ? -1 : 1;
                exitPopup.CurrentSelect  = UIFunctions.RevisionValue(exitPopup.CurrentSelect, 2);
                SoundManager.Instance.PlaySE(SoundManager.SE.Cursor);
                exitPopup.UpdateUI();
            }
        }
        else if (a.y != 0)
        {
            currentSelect += (a.y == -1) ? 1 : -1;

            currentSelect = UIFunctions.RevisionValue(currentSelect, screens.Length - 1);
            SoundManager.Instance.PlaySE(SoundManager.SE.Cursor);
            UpdateMenuUI(currentSelect);
        }
    }