beta.r3js.org
parent
084228cc09
commit
445df1a048
|
@ -281,34 +281,34 @@ GameLib.System.Input.prototype.onTouchMove = function (event) {
|
||||||
|
|
||||||
if (event.changedTouches[t].pageX > this.touches[id].pageX) {
|
if (event.changedTouches[t].pageX > this.touches[id].pageX) {
|
||||||
right += (event.changedTouches[t].pageX - this.touches[id].pageX);
|
right += (event.changedTouches[t].pageX - this.touches[id].pageX);
|
||||||
if (this.touches[id].left > 0) {
|
// if (this.touches[id].left > 0) {
|
||||||
this.touches[id].left = 0;
|
// this.touches[id].left = 0;
|
||||||
this.sensitivityCounter = this.touchSensitivity;
|
// this.sensitivityCounter = this.touchSensitivity;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.changedTouches[t].pageX < this.touches[id].pageX) {
|
if (event.changedTouches[t].pageX < this.touches[id].pageX) {
|
||||||
left += (this.touches[id].pageX - event.changedTouches[t].pageX);
|
left += (this.touches[id].pageX - event.changedTouches[t].pageX);
|
||||||
if (this.touches[id].right > 0) {
|
// if (this.touches[id].right > 0) {
|
||||||
this.touches[id].right = 0;
|
// this.touches[id].right = 0;
|
||||||
this.sensitivityCounter = this.touchSensitivity;
|
// this.sensitivityCounter = this.touchSensitivity;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.changedTouches[t].pageY < this.touches[id].pageY) {
|
if (event.changedTouches[t].pageY < this.touches[id].pageY) {
|
||||||
up += (this.touches[id].pageY - event.changedTouches[t].pageY);
|
up += (this.touches[id].pageY - event.changedTouches[t].pageY);
|
||||||
if (this.touches[id].down > 0) {
|
// if (this.touches[id].down > 0) {
|
||||||
this.touches[id].down = 0;
|
// this.touches[id].down = 0;
|
||||||
this.sensitivityCounter = this.touchSensitivity;
|
// this.sensitivityCounter = this.touchSensitivity;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.changedTouches[t].pageY > this.touches[id].pageY) {
|
if (event.changedTouches[t].pageY > this.touches[id].pageY) {
|
||||||
down += (event.changedTouches[t].pageY - this.touches[id].pageY);
|
down += (event.changedTouches[t].pageY - this.touches[id].pageY);
|
||||||
if (this.touches[id].up > 0) {
|
// if (this.touches[id].up > 0) {
|
||||||
this.touches[id].up = 0;
|
// this.touches[id].up = 0;
|
||||||
this.sensitivityCounter = this.touchSensitivity;
|
// this.sensitivityCounter = this.touchSensitivity;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
this.touches[id].right += right;
|
this.touches[id].right += right;
|
||||||
|
|
Loading…
Reference in New Issue