| 赞 | 58 |
| VIP | |
| 好人卡 | |
| 积分 | 12 |
| 经验 | |
| 最后登录 | 2023-5-29 |
| 在线时间 | 1017 小时 |
- 梦石
- 0
- 星屑
- 1232
- 在线时间
- 1017 小时
- 注册时间
- 2011-4-30
- 回帖
- 1464
|
发表于 2015-12-21 12:34:40
|
显示全部楼层
本帖最后由 余烬之中 于 2015-12-31 09:16 编辑
不推荐直接改脚本.
而且直接改脚本,1,2,3步改成一步就好
比如:
- //制作命令列表
- Window_TitleCommand.prototype.makeCommandList = function() {
- //添加一个选项 ,前面是显示内容, 后面是标志,用于方法调用时使用
- this.addCommand(TextManager.newGame, 'newGame');
- this.addCommand(TextManager.continue_, 'continue', this.isContinueEnabled());
- this.addCommand(TextManager.options, 'options');
- //如果要添添加一个项目可以直接添加文字
- this.addCommand("第四个", 'four');
- };
- (function() {
- //制作命令列表
- Window_TitleCommand.prototype.makeCommandList = function() {
- this.addCommand("新游戏", 'newGame');
- this.addCommand("继续", 'continue', this.isContinueEnabled());
- this.addCommand("设置", 'options');
- this.addCommand("退出", 'four');
- };
- //创造选择窗口
- Scene_Title.prototype.createCommandWindow = function() {
- this._commandWindow = new Window_TitleCommand();
- //标志 绑定方法 也就是当点击相应选项时,会使用该选项标志 对应的方法
- this._commandWindow.setHandler('newGame', this.commandNewGame.bind(this));
- this._commandWindow.setHandler('continue', this.commandContinue.bind(this));
- this._commandWindow.setHandler('options', this.commandOptions.bind(this));
- //添加一个
- this._commandWindow.setHandler('four', this.commandFour.bind(this));
-
- this.addWindow(this._commandWindow);
- };
- Scene_Title.prototype.commandFour = function() {
- SceneManager.exit()
- };
- })();
复制代码 |
|