예제 #1
0
 static public long GetLongEncrypted(string key, long defaultValue = 0)
 {
     try {
         string stringRep = PlayerPrefsExt.GetStringEncrypted(key, "NoValue");
         return(Convert.ToInt64(stringRep));
     }
     catch {
         return(defaultValue);
     }
 }
예제 #2
0
 static public TimeSpan GetTimeSpanEncrypted(string key, TimeSpan defaultValue)
 {
     try {
         string stringRep = PlayerPrefsExt.GetStringEncrypted(key, "NoValue");
         return(new TimeSpan(Convert.ToInt64(stringRep)));
     }
     catch {
         return(defaultValue);
     }
 }
예제 #3
0
 static public float GetFloatEncrypted(string key, float defaultValue = 0)
 {
     try {
         string stringRep = PlayerPrefsExt.GetStringEncrypted(key, "NoValue");
         return(Convert.ToSingle(stringRep));
     }
     catch {
         return(defaultValue);
     }
 }