Scene_Map.prototype.processMapTouch = function ()
{
if (TouchInput.isTriggered() || this._touchCount > 0)
{
if (TouchInput.isPressed())
{
if (this._touchCount === 0 || this._touchCount >= 15)
{
var x = $gameMap.canvasToMapX(TouchInput.x);
var y = $gameMap.canvasToMapY(TouchInput.y);
var Width = $gameVariables.value(1);
var Height = $gameVariables.value(2);
var dir = [[0, 1], [1, 0], [-1, 0], [0, -1]];
for (var k = 0; k < 4; k++)
{
var tX = x + dir[k][0];
var tY = y + dir[k][1];
if (tX >= 0 && tX < Width && tY >= 0 && tY < Height)
{
$gamePlayer.locate(tX, tY);
$gameTemp.setDestination(x, y);
break;
}
}
}
this._touchCount++;
}
else
{
this._touchCount = 0;
}
}
};
Scene_Map.prototype.processMapTouch = function ()
{
if (TouchInput.isTriggered() || this._touchCount > 0)
{
if (TouchInput.isPressed())
{
if (this._touchCount === 0 || this._touchCount >= 15)
{
var x = $gameMap.canvasToMapX(TouchInput.x);
var y = $gameMap.canvasToMapY(TouchInput.y);
var Width = $gameVariables.value(1);
var Height = $gameVariables.value(2);
var dir = [[0, 1], [1, 0], [-1, 0], [0, -1]];
for (var k = 0; k < 4; k++)
{
var tX = x + dir[k][0];
var tY = y + dir[k][1];
if (tX >= 0 && tX < Width && tY >= 0 && tY < Height)
{
$gamePlayer.locate(tX, tY);
$gameTemp.setDestination(x, y);
break;
}
}
}
this._touchCount++;
}
else
{
this._touchCount = 0;
}
}
};