![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/libs/absol-full/dist/js/ |
Upload File : |
/*** module: node_modules/absol-tutor/js/scriptor/Delay.js ***/ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _BaseCommand = _interopRequireDefault(require("./BaseCommand")); var _OOP = _interopRequireDefault(require("absol/src/HTML5/OOP")); var _TutorNameManager = _interopRequireDefault(require("./TutorNameManager")); var _TACData = _interopRequireDefault(require("./TACData")); var _TCommand = require("../engine/TCommand"); var _BaseState = _interopRequireDefault(require("./BaseState")); var _TutorEngine = _interopRequireDefault(require("./TutorEngine")); /*** * @extends BaseState * @constructor */ function StateRunTrigger() { _BaseState.default.apply(this, arguments); this.expression = this.args.until; if (this.expression && this.expression.depthClone) { this.expression = this.expression.depthClone(); } this.toId = -1; } _OOP.default.mixClass(StateRunTrigger, _BaseState.default); StateRunTrigger.prototype.onStart = function () { this.command.preventKeyBoard(true); this.command.preventMouse(true); if (typeof this.expression === "number") { this.toId = setTimeout(this.goto.bind(this, 'finish'), this.expression); } else if (this.expression && this.expression.then) { this.expression.then(this.goto.bind(this, 'finish')); } else if (this.expression && this.expression.exec) { this.expression.exec().then(this.goto.bind(this, 'finish')); } else { throw new Error("\"until\" argument is not valid!"); } }; StateRunTrigger.prototype.onStop = function () { if (this.toId > 0) { clearTimeout(this.toId); } this.command.preventKeyBoard(false); this.command.preventMouse(false); }; /*** * @extends BaseCommand * @constructor */ function Delay() { _BaseCommand.default.apply(this, arguments); } (0, _TCommand.inheritCommand)(Delay, _BaseCommand.default); Delay.prototype.argNames = ['until']; Delay.prototype.className = 'Delay'; Delay.prototype.name = 'delay'; Delay.prototype.stateClasses.entry = StateRunTrigger; _TutorEngine.default.installClass(Delay); _TutorNameManager.default.addAsync('delay'); _TACData.default.define('delay', { type: 'function', args: [{ name: 'trigger', type: 'Trigger|number' }], desc: "Chờ trong khoảng thời gian hoặc trigger kích hoạt" }); var _default = Delay; exports.default = _default;