Ejemplo n.º 1
0
    /// <summary>
    /// 選択処理
    /// </summary>
    private void Choose()
    {
        int index = (int)currentSelect;

        if (controller.MoveSelectionDown())
        {
            index++;
        }
        if (controller.MoveSelectionUp())
        {
            index--;
        }

        index         = Mathf.Abs(index) % (int)ESelection.Lock; //クランプ
        currentSelect = (ESelection)index;                       //設定しなおし
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 選択
    /// </summary>
    private void Select()
    {
        int selectInt = (int)select;

        if (controller.MoveSelectionDown())         //下
        {
            selectInt++;
            systemSe.PlaySystemSE(SystemSoundEnum.se_select);
        }
        if (controller.MoveSelectionUp())           //上
        {
            selectInt--;
            systemSe.PlaySystemSE(SystemSoundEnum.se_select);
        }

        selectInt  = Mathf.Abs(selectInt);
        selectInt %= (int)PauseSelectEnum.Null;     //添え字計算

        uiImage[(int)select].GetComponent <PauseSelectAnime>().SetVisible(false);
        uiImage[selectInt].GetComponent <PauseSelectAnime>().SetVisible(true);
        select = (PauseSelectEnum)selectInt;
    }
    //ステージを選ぶ
    void StageSelect()
    {
        if (creditFlag)
        {
            if (controller.MoveSelectionUp() || controller.MoveSelectionRight())
            {
                creditFlag = false;
            }
            return;
        }
        //選択ステージが端っこじゃないとき
        if (!(stage == allButton))
        {
            if (!(stage % constrain == 0))
            {
                if (controller.MoveSelectionRight())
                {
                    stage++;
                    return;
                }
            }
        }
        if (!(stage % constrain == 1))
        {
            if (controller.MoveSelectionLeft())
            {
                stage--;
                return;
            }
        }


        //終わりのページじゃないとき
        if (!(page == allPage))
        {
            //左下の時クレジットボタンに移動
            if (page * panelButton - constrain + 1 == stage)
            {
                if (controller.MoveSelectionDown() || controller.MoveSelectionLeft())
                {
                    creditFlag = true;
                }
            }

            //下にシフトできるとき
            if (stage + constrain <= (panelButton * page))
            {
                if (controller.MoveSelectionDown())
                {
                    stage += constrain;
                }
            }
            //上にシフトできるとき
            if (stage - constrain > ((panelButton * page) - panelButton))
            {
                if (controller.MoveSelectionUp())
                {
                    stage -= constrain;
                }
            }
        }
        //終わりのページの時
        else
        {
            int temple = allButton % constrain;
            temple = temple == 0 ? constrain : temple;
            //左下の時クレジットボタンに移動
            if (allButton - (temple) + 1 == stage)
            {
                if (controller.MoveSelectionDown() || controller.MoveSelectionLeft())
                {
                    creditFlag = true;
                }
            }

            //下にシフトできるとき
            if (stage + constrain <= allButton)
            {
                if (controller.MoveSelectionDown())
                {
                    stage += constrain;
                }
            }

            //上にシフトできるとき
            if (stage - constrain > (page - 1) * panelButton)
            {
                if (controller.MoveSelectionUp())
                {
                    stage -= constrain;
                }
            }
        }
    }