Пример #1
0
    public IEnumerator _Save()
    {
        if (!Ready())
        {
            yield return(new WaitForSeconds(0.5f));
        }

        string postContent = "";

        foreach (string key in hashmap.Keys)
        {
            postContent += key + "&&";

            if (hashmap[key].GetType() == typeof(int))
            {
                postContent += "Int" + "&&";
            }
            else if (hashmap[key].GetType() == typeof(float))
            {
                postContent += "Float" + "&&";
            }
            else if (hashmap[key].GetType() == typeof(string))
            {
                postContent += "String" + "&&";
            }
            else if (hashmap[key].GetType() == typeof(bool))
            {
                postContent += "Bool" + "&&";
            }
            else
            {
                continue;
            }

            postContent += hashmap[key] + "%%";
        }


        if (postContent != "" && postContent.Length != 0)
        {
            _saveAction = true;
            JsonNetwork.GetInstance().PostServerCommand("remoteSettings/set", postContent, callback =>
            {
                RemoteSettings.ForceUpdate();
                RemoteSettings.Updated += () =>
                {
                    _saveAction = false;
                };
            });
        }
        else
        {
            _saveAction = true;
            RemoteSettings.ForceUpdate();
            RemoteSettings.Updated += () =>
            {
                _saveAction = false;
            };
        }
    }
Пример #2
0
        IEnumerator QueryRemoteSettings()
        {
            while (gameObject.activeInHierarchy == true)
            {
                yield return(WaitEvery);

                RemoteSettings.ForceUpdate();
            }
        }
Пример #3
0
 private void InitRemoteConfigs()
 {
     status = Status.WORKING;
     if (Application.internetReachability == NetworkReachability.NotReachable)
     {
         // Offline
         ApplySettings(false);
     }
     else
     {
         // Online
         RemoteSettings.ForceUpdate();
     }
 }
Пример #4
0
 void OnEnable()
 {
     RemoteSettings.Updated -= HandleRemoteSettingsUpdated;
     RemoteSettings.Updated += HandleRemoteSettingsUpdated;
     RemoteSettings.ForceUpdate();
 }
Пример #5
0
 private void PrepareUpdateChecker()
 {
     RemoteSettings.Completed += CheckUpdateNotification;
     RemoteSettings.ForceUpdate();
 }
Пример #6
0
 public void ForceUpdate()
 {
     RemoteSettings.ForceUpdate();
 }
    public void FetchSettings()
    {
        busy = true;

        RemoteSettings.ForceUpdate();  //RemoteSettingsから取得
    }
Пример #8
0
 public Endpoint()
 {
     RemoteSettings.ForceUpdate();
     RemoteSettings.Updated += new RemoteSettings.UpdatedEventHandler(OnUpdateRemoteSettings);
 }
 void ISettingReloader.Reload() =>
 RemoteSettings.ForceUpdate();