function Scene_Custom() {
this.initialize(...arguments);
}
Scene_Custom.prototype = Object.create(Scene_MenuBase.prototype);
Scene_Custom.prototype.constructor = Scene_Custom;
Scene_Custom.prototype.initialize = function() {
Scene_MenuBase.prototype.initialize.call(this);
};
Scene_Custom.prototype.start = function() {
Scene_MenuBase.prototype.start.call(this);
};
Scene_Custom.prototype.update = function() {
Scene_MenuBase.prototype.update.call(this);
if ($gameTemp.isCommonEventReserved() && $gameTemp.reservedCommonEvent().eventId() === 74) {
this.exitScene(); //74号公共事件执行完后退出场景
}
};
Scene_Custom.prototype.exitScene = function() {
SceneManager.pop();
};
// 在场景创建时执行73号公共事件
SceneManager.onSceneCreate = function(scene) {
if (scene instanceof Scene_Custom) {
$gameTemp.reserveCommonEvent(73);
}
};