Files
optolith-client/js/stores/data/Increasable.js
T
Lukas Obermann e1927227bf Changed data objects to ES6 classes
Additionally changed folder structure to components and views
2016-11-14 00:18:09 +01:00

29 lines
352 B
JavaScript

import Dependent from './Dependent';
export default class Increasable extends Dependent {
constructor(args) {
super(args);
this.value = 0;
}
set(value) {
this.value = value;
}
add(value) {
this.value += value;
}
remove(value) {
this.value -= value;
}
addPoint() {
this.value += 1;
}
removePoint() {
this.value -= 1;
}
}