Skip to content

Instantly share code, notes, and snippets.

@triacontane
Created October 12, 2017 17:13
Show Gist options
  • Save triacontane/890a15b75e96bdd247adfd4282febb85 to your computer and use it in GitHub Desktop.
Save triacontane/890a15b75e96bdd247adfd4282febb85 to your computer and use it in GitHub Desktop.
メニュー画面のコマンドからコモンイベントを呼び出す
(function() {
'use strict';
var _Scene_Menu_createCommandWindow = Scene_Menu.prototype.createCommandWindow;
Scene_Menu.prototype.createCommandWindow = function() {
_Scene_Menu_createCommandWindow.apply(this, arguments);
this._commandWindow.setHandler('equip', this.callCommonEvent.bind(this, 1));
};
Scene_Menu.prototype.callCommonEvent = function(commonEventId) {
$gameTemp.reserveCommonEvent(commonEventId);
SceneManager.goto(Scene_Map);
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment