Esempio n. 1
0
        public static Model.Version Parse(string data)
        {
            string[] columns = data.Split('\t');

            Model.Version version = new Model.Version();
            version.build  = columns[0];
            version.sheets = columns[1];
            return(version);
        }
Esempio n. 2
0
        public void Check(Action <bool> onSuccess, Action <string> onFail)
        {
            Downloader.Download(
                URL(),
                data =>
            {
                remoteData = data;

                Model.Version localVersion = Parse();
                localVersion.build         = Application.version;

                Model.Version remoteVersion = Parse(data);

                Debug.Log($"Local: {localVersion} | Remote: {remoteVersion}");

                bool isDifferent = localVersion >= remoteVersion &&
                                   localVersion.sheets != remoteVersion.sheets;

                onSuccess?.Invoke(isDifferent);
            },
                onFail
                );
        }