| | 1 | | namespace DCL.Helpers |
| | 2 | | { |
| | 3 | | public class DefaultPlayerPrefs : IPlayerPrefs |
| | 4 | | { |
| 0 | 5 | | public bool ContainsKey(string key) => PlayerPrefsUtils.HasKey(key); |
| | 6 | |
|
| | 7 | | public string GetString(string key, string defaultValue = null) => |
| 0 | 8 | | PlayerPrefsUtils.GetString(key, defaultValue); |
| | 9 | |
|
| | 10 | | public bool GetBool(string key, bool defaultValue = false) => |
| 0 | 11 | | PlayerPrefsUtils.GetBool(key, defaultValue); |
| | 12 | |
|
| | 13 | | public int GetInt(string key, int defaultValue = 0) => |
| 0 | 14 | | PlayerPrefsUtils.GetInt(key, defaultValue); |
| | 15 | |
|
| | 16 | | public float GetFloat(string key, float defaultValue = 0) => |
| 0 | 17 | | PlayerPrefsUtils.GetFloat(key, defaultValue); |
| | 18 | |
|
| | 19 | | public void Set(string key, string value) => |
| 0 | 20 | | PlayerPrefsUtils.SetString(key, value); |
| | 21 | |
|
| | 22 | | public void Set(string key, int value) => |
| 0 | 23 | | PlayerPrefsUtils.SetInt(key, value); |
| | 24 | |
|
| | 25 | | public void Set(string key, bool value) => |
| 0 | 26 | | PlayerPrefsUtils.SetBool(key, value); |
| | 27 | |
|
| | 28 | | public void Set(string key, float value) => |
| 0 | 29 | | PlayerPrefsUtils.SetFloat(key, value); |
| | 30 | |
|
| 0 | 31 | | public void Save() => PlayerPrefsUtils.Save(); |
| | 32 | | } |
| | 33 | | } |