life-towers/src/app/store/unique.ts
Andras Schmelczer 19aad2b2af Fix UX
2019-09-21 11:51:53 +02:00

29 lines
431 B
TypeScript

export class Unique {
private static nextId = 0;
private static store;
constructor() {
this.setUniqueness();
}
static get ObjectCount(): number {
return Unique.nextId;
}
private _id: number;
get id(): number {
return this._id;
}
private _copies = 0;
get copies(): number {
return this._copies;
}
protected setUniqueness() {
this._id = Unique.nextId++;
this._copies++;
}
}