예제 #1
0
 void RemoteSettingsUpdated()
 {
     for (int i = 0; i < m_DriveableProperty.fields.Count; i++)
     {
         var f = m_DriveableProperty.fields[i];
         if (!string.IsNullOrEmpty(f.rsKeyName) && RS.HasKey(f.rsKeyName) && f.target != null && !string.IsNullOrEmpty(f.fieldPath))
         {
             //Type doesn't work with a switch, so let's do it this way
             if (f.type == "bool")
             {
                 f.SetValue(RS.GetBool(f.rsKeyName));
             }
             else if (f.type == "float")
             {
                 f.SetValue(RS.GetFloat(f.rsKeyName));
             }
             else if (f.type == "int")
             {
                 f.SetValue(RS.GetInt(f.rsKeyName));
             }
             else if (f.type == "string")
             {
                 f.SetValue(RS.GetString(f.rsKeyName));
             }
         }
     }
 }
 private void AfterChecked(bool wasUpdatedFromServer, bool settingsChanged, int serverResponse)
 {
     Latest_Build = RS.GetInt("Latest_Build");
     if (Latest_Build > current_build)
     {
         updateCanvas.SetActive(true);
         StartCoroutine(AnimateVisualTrick());
         gameObject.SetActive(false);
     }
 }
예제 #3
0
 public static int GetInt(string key)
 {
     return(RemoteSettings.GetInt(key, 0));
 }
예제 #4
0
        public static int GetInt(string key)
        {
            int defaultValue = 0;

            return(RemoteSettings.GetInt(key, defaultValue));
        }