avocado-old/packages/behavior/item/routine.js

30 lines
419 B
JavaScript
Raw Normal View History

2019-03-17 23:45:48 -05:00
import {Actions} from './actions';
export class Routine {
static type() {
return 'routine';
}
constructor() {
this.actions = new Actions();
}
fromJSON(json) {
this.actions.fromObject(json.actions);
return this;
}
tick(context, elapsed) {
this.actions.tick(context, elapsed);
}
toJSON() {
return {
type: 'routine',
actions: this.actions.toJSON(),
}
}
}