Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Header("Alterações Minhas Para facilitar")
- var CaminhoAux : String;
- var LocalSave : String = "/LastSurvivor";
- function LerPastas() {
- LinhasInf = Directory.GetDirectories(CaminhoAux+"/");
- Linhas = new String[LinhasInf.Length];
- for (i = 0; i < LinhasInf.Length; i++){
- Linhas[i] = Path.GetFileName(LinhasInf[i]);
- }
- }
- function Awake () {
- CaminhoAux = Application.dataPath+LocalSave;
- }
- function onGUI() {
- if(Salvos){
- if (GUI.Button(Rect(Screen.height/2-Screen.height/2,Screen.width/5,90,100),Imagens[2])){
- Salvos = false;
- Menu = true;
- }
- if (GUI.Button(Rect(Screen.height/2-Screen.height/2,Screen.width/30,90,100),Imagens[5])){
- DeletarPasta =!DeletarPasta;
- }
- if (GUI.Button(Rect(Screen.height/2-Screen.height/2,Screen.width/2-Screen.width/7.5,90,100),Imagens[6])){
- GetComponent.<AudioSource>().clip = soundClick;
- GetComponent.<AudioSource>().Play();
- isLoading = true;
- CriarMundo = true;
- Salvos = false;
- }
- try
- {
- GUI.Button(Rect (Screen.width/2 -Screen.width /30 , Screen.height/2+Screen.height/150, Screen.width/2,Screen.height/20),""+CaminhoAux);
- Scroll = GUI.BeginScrollView( Rect(Screen.width/2-Screen.width/2, Screen.height/2-Screen.height/3, Screen.width/0.5, Screen.height/1.5), Scroll, Rect(0, 0, 0, Linhas.Length*100));
- for (var i = 0; i < Linhas.Length; i++){
- if (GUI.Button(Rect(Screen.width/2-Screen.width/2.5 , Screen.height / 5-Screen.height / 20 + i * Screen.height/9.5, Screen.width / 1.5+Screen.width/3, Screen.height / 10), Linhas[i])){
- GetComponent.<AudioSource>().clip = soundClick;
- GetComponent.<AudioSource>().Play();
- if(!DeletarPasta){
- Salvos = false;
- MapaSelec = ""+Linhas[i];
- Carregar(true,false);
- }else{
- Directory.Delete(CaminhoAux+"/"+Linhas[i],true);
- DeletarPasta = false;
- }
- }
- }
- GUI.EndScrollView();
- }catch(err){
- }
- GUI.Box(Rect (Screen.width/2-Screen.width/2.5, Screen.height/5-Screen.height/5, Screen.width / 1.1, Screen.height/2+Screen.height/1),"Mundos Salvos");
- // if(GUI.Button(Rect(Screen.width/2)))
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement