(object: Partial<PlayerPreferences> | null = null, save = false)
| 1239 | } |
| 1240 | |
| 1241 | static preferences (object: Partial<PlayerPreferences> | null = null, save = false): PlayerPreferences { |
| 1242 | if (object !== null) { |
| 1243 | |
| 1244 | this._preferences = merge (this._preferences, object); |
| 1245 | |
| 1246 | const storageConfig = this.Storage.configuration (); |
| 1247 | |
| 1248 | if (!storageConfig || storageConfig.name === '') { |
| 1249 | this.setupStorage (); |
| 1250 | } |
| 1251 | |
| 1252 | if (save === true) { |
| 1253 | this.Storage.update ('Settings', this._preferences); |
| 1254 | } |
| 1255 | } |
| 1256 | |
| 1257 | return this._preferences; |
| 1258 | } |
| 1259 | |
| 1260 | /** |
| 1261 | * Get or set the configuration. |
no test coverage detected