Game_Character.prototype.getMouseDirection = function() {
var my = $gameMap.canvasToMapX(TouchInput.y)-this.y;
var mx = $gameMap.canvasToMapX(TouchInput.x)-this.x;
var x = 0;
var y = 0;
if (eval(Continuum.Snippets.FaceMouse.eight)) {
if (mx > 0) {
x = 1;
} else if (mx < 0) {
x = -1;
}
if (my > 0) {
y = 1;
} else if (my < 0) {
y = -1;
}
} else {
if (Math.abs(mx) > Math.abs(my)) {
if (mx > 0) {
x = 1
} else if (mx < 0) {
x = -1
}
} else {
if (my > 0) {
y = 1
} else if (my < 0) {
y = -1
}
}
}
if (x !== 0 || y !== 0) {
return 5 - y * 3 + x;
}
return 0;
};
TouchInput._onMouseMove = function(event) {
var x = Graphics.pageToCanvasX(event.pageX);
var y = Graphics.pageToCanvasY(event.pageY);
this._onMove(x, y);
};
continuumFaceMouse_player_update = Game_Player.prototype.update
Game_Player.prototype.update = function(sceneActive) {
if (sceneActive) {
var d = this.getMouseDirection();
if (d > 0) this._direction = d;
}
continuumFaceMouse_player_update.call(this,sceneActive)
};