public void selected() { if (index == whereSpawn.story_n) { if (Input.GetKeyDown(KeyCode.Z)) { whereSpawn.where = 1; selected_bool = true; scene_anim.SetTrigger("close"); k = 8; select_bool = false; loading.loadingachangescene(4); } } if (index == whereSpawn.story_n + 1) { if (Input.GetKeyDown(KeyCode.Z)) { scene_anim.SetTrigger("close"); // index = 0; k = 8; select_bool = false; } } if (Input.GetKeyDown(KeyCode.X)) { scene_anim.SetTrigger("close"); index = 0; select_bool = false; } }
private void OnTriggerStay2D(Collider2D other) { if (other.gameObject.name == "player") { if (player.isGrounded == true) { if (Input.GetKeyDown(KeyCode.UpArrow)) { whereSpawn.where = tranform; //SceneManager.LoadScene(scene); loading.loadingachangescene(scene); //player.canmove = false; } } } }