コード例 #1
0
 //===================================================
 // ステージ選択用(シーンロード指定)
 //===================================================
 public void StageSelect(int Stagenam)
 {
     if (Stagenam == 8)
     {
         StartCoroutine("AllStageClear");
     }
     else
     if (allScene)
     {
         allScene.Loadstagenum(Stagenam);
     }
 }
コード例 #2
0
 public void ReturnSelect()
 {
     if (managerScript)
     {
         managerScript.SetBGMVolume(BGMValue.value);
         managerScript.SetSEVolume(SEValue.value);
         PlayerPrefs.Save();
         managerScript.Loadstagenum(500);
     }
     else
     {
         PlayerPrefs.SetFloat("BGM", BGMValue.value);
         PlayerPrefs.SetFloat("SE", SEValue.value);
     }
 }
コード例 #3
0
 void Update()
 {
     if (m_bflag)
     {
         timer += Time.deltaTime / 10;
         panel.transform.localPosition = Vector3.Lerp(pos, Vector3.zero, timer);
         if (timer > 1)
         {
             m_bflag = false;
             Invoke("ActiveEnd", 1);
         }
     }
     if (m_bButtoon)
     {
         if (Input.GetButtonDown("Button_A"))
         {
             if (all)
             {
                 all.Loadstagenum(1000);
             }
         }
     }
 }
コード例 #4
0
    void Update()
    {
        if (!ControllerMenuFlag)
        {
            float Lstick = Input.GetAxis("L_Vertical");
            if (beforeAxis == 0 && 0 != Lstick)
            {
                if (Lstick > 0)
                {
                    if (--value < 0)
                    {
                        value = 3;
                    }
                }
                else if (Lstick < 0)
                {
                    if (++value > 3)
                    {
                        value = 0;
                    }
                }
            }
            beforeAxis = Lstick;
            SelectLighting();


            if (InStage)
            {
                switch (value)
                {
                case 0:
                    State = MenuState.Reset;
                    break;

                case 1:
                    State = MenuState.ReSelect;
                    break;

                case 2:
                    State = MenuState.Controll;
                    break;

                case 3:
                    State = MenuState.Close;
                    break;
                }
            }
            else
            {
                switch (value)
                {
                case 0:
                    State = MenuState.Controll;
                    break;

                case 1:
                    State = MenuState.Config;
                    break;

                case 2:
                    State = MenuState.Title;
                    break;

                case 3:
                    State = MenuState.Close;
                    break;
                }
            }
            if (Input.GetButtonDown("Button_START"))
            {
                sceneManagerScript.MenuEnd();
            }
            else if (Input.GetButtonDown("Button_A"))
            {
                switch (State)
                {
                case MenuState.Controll:
                    audio.PlayOneShot(SoundBA);
                    ControllerCanvas.gameObject.SetActive(true);
                    ControllerCanvas.GetChild(2).gameObject.SetActive(true);
                    if (!ControllerMenuFlag)
                    {
                        ControllerMenuFlag = true;
                    }
                    break;

                case MenuState.Config:
                    audio.PlayOneShot(SoundBA);
                    sceneManagerScript.Loadstagenum(600);
                    break;

                case MenuState.Title:
                    audio.PlayOneShot(SoundBA);
                    sceneManagerScript.Loadstagenum(1000);
                    break;

                case MenuState.Close:
                    if (!InStage)
                    {
                        stageselect.MenuClose_ButtonControllOK();
                    }
                    audio.PlayOneShot(SoundBB);
                    sceneManagerScript.MenuEnd();
                    break;

                case MenuState.Reset:
                    audio.PlayOneShot(SoundBA);
                    sceneManagerScript.ReStage();
                    break;

                case MenuState.ReSelect:
                    audio.PlayOneShot(SoundBA);
                    sceneManagerScript.Loadstagenum(500);
                    break;
                }
                if (!ControllerMenuFlag)
                {
                    sceneManagerScript.MenuEnd();
                }
            }
        }
        else if (MovieFlag)
        {
            if (Input.GetButtonDown("Button_A") || Input.GetButtonDown("Button_B") ||
                Input.GetButtonDown("Button_X") || Input.GetButtonDown("Button_Y"))
            {
                audio.PlayOneShot(SoundBB);
                PVplayer.Stop();
                PVplayer.gameObject.SetActive(false);
                GetComponent <AudioSource>().Play();
                MovieFlag = false;
            }
        }
        else
        {
            if (Input.GetButtonDown("Button_A"))
            {
                audio.PlayOneShot(SoundBB);
                ControllerCanvas.GetChild(2).gameObject.SetActive(false);
                ControllerCanvas.gameObject.SetActive(false);
                if (ControllerMenuFlag)
                {
                    ControllerMenuFlag = false;
                }
            }
            else if (Input.GetButtonDown("Button_X"))
            {
                audio.PlayOneShot(SoundBA);
                PVplayer.gameObject.SetActive(true);
                GetComponent <AudioSource>().Pause();
                if (!MovieFlag)
                {
                    MovieFlag = true;
                }
            }
        }
    }