const __ = {
private: Symbol('private'),
}
/**
* The base level control class.
* @memberof THING
* @public
*/
class BaseLevelControl {
constructor(options) {
let _private = this[__.private] = {};
_private.isRunning = false;
_private.options = options || {};
_private.eventMap = {};
}
/**
* When entering the level.
* @param {Object} param - Enter the parameters of the level.
* @public
*/
onEnter(param) {
let _private = this[__.private];
_private.isRunning = true;
}
/**
* When leaving the level.
* @param {Object} param - Leave the parameters of the level.
* @public
*/
onLeave(param) {
let _private = this[__.private];
_private.isRunning = false;
}
get options() {
let _private = this[__.private];
return _private.options;
}
/**
* Get whether it is running
* @type {Boolean}
*/
get isRunning() {
let _private = this[__.private];
return _private.isRunning;
}
}
export { BaseLevelControl };