Esempio n. 1
0
 public void ReturnLoadingWithError(string Error)
 {
     //Map = false;
     //OpenComposition(0);
     ErrorPopup.Show(true, Error);
     ErrorPopup.InvokeHide();
 }
Esempio n. 2
0
    public IEnumerator ForceLoadMapAtPath(string path, bool Props, bool Decals)
    {
        path = path.Replace("\\", "/");
        Debug.Log("Load from: " + path);

        char[]   NameSeparator = ("/").ToCharArray();
        string[] Names         = path.Split(NameSeparator);

        FolderParentPath = "";

        for (int i = 0; i < Names.Length - 2; i++)
        {
            FolderParentPath += Names[i] + "/";
        }

        FolderName       = Names[Names.Length - 2];
        ScenarioFileName = Names[Names.Length - 1].Replace(".lua", "");
        //string NewMapPath = path.Replace(FolderName + "/" + ScenarioFileName + ".lua", "");

        Debug.Log("Parsed args: \n"
                  + FolderName + "\n"
                  + ScenarioFileName + "\n"
                  + FolderName);


        //PlayerPrefs.SetString("MapsPath", NewMapPath);
        loadSave   = false;
        LoadProps  = Props;
        LoadDecals = Decals;

        LoadingFileCoroutine = StartCoroutine(LoadingFile());
        yield return(LoadingFileCoroutine);

        InfoPopup.Show(false);
        //PlayerPrefs.SetString("MapsPath", LastMapPatch);
    }