代码拉取完成,页面将自动刷新
/*:
* RS_EventTouch.js
* @plugindesc This plugin allows you to execute the event when you are clicking
* the event.
* @author biud436
*
* @param Event Regex
* @desc this parameter define a RegExp
* @default /Event[ ]*Click/ig
*
* @help
* 1. Adding the command called 'Comment' into the event
* 2. The event's setup is simplify. It is done that you are to enter the comment
* called 'Event Click' into the event's list.
*
* - Change Log
* 2016.07.03 (v1.0.0) - First Release
* 2017.01.30 (v1.0.1) - Fixed the bug that is not working when using event starting conditions
* 2017.01.31 (v1.0.2) - Fixed the bug is not working this plugin properly
*/
var Imported = Imported || {};
Imported.RS_EventTouch = true;
(function () {
var parameters = PluginManager.parameters('RS_EventTouch');
var regex = eval(parameters['Event Regex']) || /Event[ ]*Click/ig;
Game_Map.prototype.executeTouchEvent = function() {
var x, y, id, lEvent;
if(TouchInput.isTriggered()) {
x = $gameMap.canvasToMapX(TouchInput._x),
y = $gameMap.canvasToMapY(TouchInput._y),
id = $gameMap.eventIdXy(x, y);
lEvent = this.event(id);
if(!lEvent) return false;
if(lEvent.findProperPageIndex() < 0) return false;
lEvent.list().forEach(function(i) {
if(i.code === 108 || i.code === 408) {
if( i.parameters[0].match(regex) ) {
if(lEvent._trigger < 3) lEvent.start();
}
}
}, this);
}
};
var alias_Game_Map_update = Game_Map.prototype.update;
Game_Map.prototype.update = function(sceneActive) {
alias_Game_Map_update.call(this, sceneActive);
this.executeTouchEvent();
};
})();
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。