// Update is called once per frame void Update() { if (controller.Buttom_Start) { SceneScript.ChangeScene("MenuScene"); } }
// Update is called once per frame void Update() { if (controller.Vertical < 0 && !pressedV) { i = i + 1 >= uIPositions.Length ? 0 : ++i; pressedV = true; } if (controller.Vertical > 0 && !pressedV) { i = i - 1 < 0 ? uIPositions.Length - 1 : --i; pressedV = true; } else if (controller.Vertical == 0) { pressedV = false; } pointer.transform.position = uIPositions[i].position; switch (i) { case 0: { if (controller.Buttom_A && !once) { SceneScript.ChangeScene(SceneNames[0]); once = true; FindObjectOfType <AudioManager>().Stop("Intro"); } break; } case 1: { if (controller.Horizontal < 0 && !pressed) { j = j - 1 < 0 ? paletteOpcions.Length - 1 : --j; pressed = true; } if (controller.Horizontal > 0 && !pressed) { j = j + 1 >= paletteOpcions.Length ? 0 : ++j; pressed = true; } else if (controller.Horizontal == 0) { pressed = false; } paleteText.text = string.Concat("Palette", "<", paletteOpcions[j].name.ToString(), ">"); PaletteSwapLookup.LookupTexture = paletteOpcions[j]; break; } case 2: { if (controller.Buttom_A && !once) { SceneScript.ChangeScene(SceneNames[1]); once = true; FindObjectOfType <AudioManager>().Stop("Intro"); } break; } } }
void ChangeScene() { SceneScript.ChangeScene(NextScene); }
private void ChangeScene() { SceneScript.ChangeScene("Main"); }