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; } } } }