public void SetUp()
        {
            IPrefAccessor <string> accessor = new StringPrefAccessor();
            var powerPrefsAccessor          = new PowerPrefsAccessor <string>(accessor);

            valueAccessor = new PowerPrefsKeyAccessor <string>(powerPrefsAccessor, TestKey);
        }
Пример #2
0
 /// <summary>
 /// Create a PlayerPrefs accessor to read and write double type values.
 /// </summary>
 /// <returns>Double prefs accessor</returns>
 public static PowerPrefsAccessor <double> ForDouble()
 {
     if (doubleAccessor == null)
     {
         doubleAccessor = new PowerPrefsAccessor <double>(new DoublePrefAccessor());
     }
     return(doubleAccessor);
 }
Пример #3
0
 /// <summary>
 /// Create a PlayerPrefs accessor to read and write char type values.
 /// </summary>
 /// <returns>Char prefs accessor</returns>
 public static PowerPrefsAccessor <char> ForChar()
 {
     if (charAccessor == null)
     {
         charAccessor = new PowerPrefsAccessor <char>(new CharPrefAccessor());
     }
     return(charAccessor);
 }
Пример #4
0
 /// <summary>
 /// Create a PlayerPrefs accessor to read and write string type values.
 /// </summary>
 /// <returns>String prefs accessor</returns>
 public static PowerPrefsAccessor <string> ForString()
 {
     if (stringAccessor == null)
     {
         stringAccessor = new PowerPrefsAccessor <string>(new StringPrefAccessor());
     }
     return(stringAccessor);
 }
Пример #5
0
 /// <summary>
 /// Create a PlayerPrefs accessor to read and write int type values.
 /// </summary>
 /// <returns>Int prefs accessor</returns>
 public static PowerPrefsAccessor <int> ForInt()
 {
     if (intAccessor == null)
     {
         intAccessor = new PowerPrefsAccessor <int>(new IntPrefAccessor());
     }
     return(intAccessor);
 }
Пример #6
0
 /// <summary>
 /// Create a PlayerPrefs accessor to read and write float type values.
 /// </summary>
 /// <returns>Float prefs accessor</returns>
 public static PowerPrefsAccessor <float> ForFloat()
 {
     if (floatAccessor == null)
     {
         floatAccessor = new PowerPrefsAccessor <float>(new FloatPrefAccessor());
     }
     return(floatAccessor);
 }
Пример #7
0
 /// <summary>
 /// Create a PlayerPrefs accessor to read and write bool type values.
 /// </summary>
 /// <returns>Bool prefs accessor</returns>
 public static PowerPrefsAccessor <bool> ForBool()
 {
     if (boolAccessor == null)
     {
         boolAccessor = new PowerPrefsAccessor <bool>(new BoolPrefAccessor());
     }
     return(boolAccessor);
 }
Пример #8
0
 /// <summary>
 /// Create a PlayerPrefs accessor to read and write DateTime type values.
 /// </summary>
 /// <returns>DateTime prefs accessor</returns>
 public static PowerPrefsAccessor <DateTime> ForDateTime()
 {
     if (dateTimeAccessor == null)
     {
         dateTimeAccessor = new PowerPrefsAccessor <DateTime>(new DateTimePrefAccessor());
     }
     return(dateTimeAccessor);
 }
Пример #9
0
 /// <summary>
 /// Create a PlayerPrefs accessor to read and write long type values.
 /// </summary>
 /// <returns>Long prefs accessor</returns>
 public static PowerPrefsAccessor <long> ForLong()
 {
     if (longAccessor == null)
     {
         longAccessor = new PowerPrefsAccessor <long>(new LongPrefAccessor());
     }
     return(longAccessor);
 }
        public void SetUp()
        {
            IPrefAccessor <int> accessor = new IntPrefAccessor();

            powerPrefsAccessor = new PowerPrefsAccessor <int>(accessor);
        }