public void MapSelect(int stage) { Singleton.getInstance.untouched = true; if (Singleton.getInstance.Popup_open == true) { closemap(); } else { Singleton.getInstance.GameMode = true; Singleton.getInstance.GameState = GameState.PlayNormal; ingame_sc.ShowMapName(); pb_sc.Clear(6); } if (Now_using_map != null) { Destroy(Now_using_map); } if (Singleton.getInstance.world == 1) { if (stage == 1 || stage == 2) { Now_using_map = Instantiate(Map[0]); Camera_AudioSource.clip = Inanis_sound2; Camera_AudioSource.Play(); } else if (stage == 3 || stage == 4) { Now_using_map = Instantiate(Map[1]); Camera_AudioSource.clip = Inanis_sound2; Camera_AudioSource.Play(); } else if (stage == 5 || stage == 6) { Now_using_map = Instantiate(Map[2]); Camera_AudioSource.clip = Inanis_sound2; Camera_AudioSource.Play(); } else if (stage == 7) { Now_using_map = Instantiate(Map[3]); Camera_AudioSource.clip = Inanis_sound1; Camera_AudioSource.Play(); } else if (stage == 999) { Singleton.getInstance.myworld = World.WorldTree; Now_using_map = Instantiate(WorldTreeMap); Camera_AudioSource.clip = WorldTreeSound; Camera_AudioSource.Play(); } } Now_using_map.transform.SetParent(Map_parents.transform); Now_using_map.transform.localScale = new Vector3(1, 1, 1); Now_using_map.transform.localPosition = new Vector3(0, 635, 0); }