设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 3104|回复: 1
打印 上一主题 下一主题

[有事请教] 如何取消MZ的触屏功能

[复制链接]

Lv3.寻梦者

梦石
0
星屑
3048
在线时间
140 小时
注册时间
2018-1-22
帖子
137
1
发表于 2021-3-23 17:16:41 | 显示全部楼层
保存下面代码为js文件,然后工程中开启插件

  1. /*:
  2. * @target MZ
  3. */
  4. Scene_Map.prototype.isMapTouchOk = function() {
  5.     return false;
  6. };

  7. Window_Selectable.prototype.update = function() {
  8.     this.processCursorMove();
  9.     this.processHandling();
  10.     Window_Scrollable.prototype.update.call(this);
  11. };

  12. var _titleCommand_makeList = Window_TitleCommand.prototype.makeCommandList;
  13. Window_TitleCommand.prototype.makeCommandList = function() {
  14.     _titleCommand_makeList.call(this);
  15.     this.addCommand(TextManager.gameEnd, "exit");
  16. };

  17. var _title_createCommandWindow = Scene_Title.prototype.createCommandWindow;
  18. Scene_Title.prototype.createCommandWindow = function() {
  19.     _title_createCommandWindow.call(this);
  20.     this._commandWindow.setHandler("exit", this.commandExit.bind(this));
  21. };

  22. Scene_Title.prototype.commandExit = function() {
  23.     SceneManager.exit();
  24. };
复制代码

另外插句题外话:发帖前建议先搜索全站,像是退出游戏这种,站内肯定有大佬发过类似教程的
自分自身の神様になること
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-10 13:27

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表