Create Settings class.
This commit is contained in:
parent
d5a8fdf3d4
commit
40f277884e
1 changed files with 19 additions and 0 deletions
19
src/models/Settings.ts
Normal file
19
src/models/Settings.ts
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
export class Settings {
|
||||||
|
static #instance: Settings;
|
||||||
|
|
||||||
|
minValue: number;
|
||||||
|
maxDistance: number;
|
||||||
|
|
||||||
|
private constructor() {
|
||||||
|
this.minValue = 500000;
|
||||||
|
this.maxDistance = 10000;
|
||||||
|
}
|
||||||
|
|
||||||
|
static get(): Settings {
|
||||||
|
if (!Settings.#instance) {
|
||||||
|
Settings.#instance = new Settings();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Settings.#instance;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue