Ejemplo n.º 1
0
    public static float GetFloat(string key, float defaultValue = 0)
    {
        int hash = key.GetHashCode();

        Dic_Float.TryGetValue(key, out defaultValue);
        return(defaultValue);
    }
Ejemplo n.º 2
0
 public static bool HasKey(string key)
 {
     //int hash = key.GetHashCode();
     if (Dic_Float.ContainsKey(key) ||
         Dic_Int.ContainsKey(key) ||
         Dic_Str.ContainsKey(key))
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 3
0
 public static void SetFloat(string key, float value)
 {
     //int hash = key.GetHashCode();
     if (Dic_Float.ContainsKey(key))
     {
         Dic_Float[key] = value;
     }
     else
     {
         Dic_Float.Add(key, value);
     }
 }
Ejemplo n.º 4
0
 public static void DeleteKey(string key)
 {
     //int hash = key.GetHashCode();
     if (Dic_Float.ContainsKey(key))
     {
         Dic_Float.Remove(key);
     }
     if (Dic_Int.ContainsKey(key))
     {
         Dic_Int.Remove(key);
     }
     if (Dic_Str.ContainsKey(key))
     {
         Dic_Str.Remove(key);
     }
 }