Beispiel #1
0
    IEnumerator CheckChangelog()
    {
        WWW WWWChangelog = new WWW("http://aotmod.sl0w.org/changelog.txt");

        yield return(WWWChangelog);

        if (!string.IsNullOrEmpty(WWWChangelog.error))
        {
            UnityEngine.Debug.Log(WWWChangelog.error);
            ModDrawGUI.AddDebugLine(1, WWWChangelog.error);
        }
        Changelog = WWWChangelog.text;
    }
Beispiel #2
0
    IEnumerator CheckNotes()
    {
        WWW WWWNotes = new WWW("http://aotmod.sl0w.org/notes.txt");

        yield return(WWWNotes);

        if (!string.IsNullOrEmpty(WWWNotes.error))
        {
            UnityEngine.Debug.Log(WWWNotes.error);
            ModDrawGUI.AddDebugLine(1, WWWNotes.error);
        }
        Notes = WWWNotes.text;
    }
Beispiel #3
0
    IEnumerator CheckVersion()
    {
        WWW WWWUpdate = new WWW("http://aotmod.sl0w.org/version.txt");

        yield return(WWWUpdate);

        if (!string.IsNullOrEmpty(WWWUpdate.error))
        {
            UnityEngine.Debug.Log(WWWUpdate.error);
            ModDrawGUI.AddDebugLine(1, WWWUpdate.error);
        }

        string[] UpdateString = WWWUpdate.text.Split(new char[] { ' ' });
        if (FengGameManagerMKII.ModVersion != UpdateString[0])
        {
            FengGameManagerMKII.DownloadDLL = true;
            //ModDrawGUI.AddDebugLine(1, "Downloading new version...");
            FengGameManagerMKII.UpdateType    = 2;
            FengGameManagerMKII.UpdateStatus  = "Downloading new version...";
            FengGameManagerMKII.HasToDownload = true;
            UnityEngine.Debug.Log(WWWUpdate.text);
        }
        else
        {
            FengGameManagerMKII.UpdateType   = 3;
            FengGameManagerMKII.UpdateStatus = "Version is current...";
            //ModDrawGUI.AddDebugLine(3, "Version is current...");
        }

        if (UpdateString[1] == "1" && FengGameManagerMKII.DownloadDLL == true)
        {
            FengGameManagerMKII.DownloadAsset = true;
        }

        if (FengGameManagerMKII.DownloadDLL == true)
        {
            base.StartCoroutine(DownloadModule());
        }

        if (FengGameManagerMKII.DownloadAsset == true)
        {
            base.StartCoroutine(DownloadAsets());
        }
    }