Update: CC - Touch Move (evwkow5289.js) 24 bytes modified
parent
abf1a0d748
commit
b31123bb21
|
@ -50,21 +50,21 @@ this.x += Math.round(touch.right * sensitivity);
|
||||||
this.y -= Math.round(touch.up * sensitivity);
|
this.y -= Math.round(touch.up * sensitivity);
|
||||||
this.y += Math.round(touch.down * sensitivity);
|
this.y += Math.round(touch.down * sensitivity);
|
||||||
|
|
||||||
if (this.x < 0) {
|
//if (this.x < 0) {
|
||||||
this.x = 0;
|
// this.x = 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (this.x > this.size.width) {
|
//if (this.x > this.size.width) {
|
||||||
this.x = this.size.width;
|
// this.x = this.size.width;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (this.y < 0) {
|
//if (this.y < 0) {
|
||||||
this.y = 0;
|
// this.y = 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (this.y > this.size.height) {
|
//if (this.y > this.size.height) {
|
||||||
this.y = this.size.height;
|
// this.y = this.size.height;
|
||||||
}
|
//}
|
||||||
|
|
||||||
GameLib.Event.Emit(
|
GameLib.Event.Emit(
|
||||||
GameLib.Event.MOUSE_MOVE,
|
GameLib.Event.MOUSE_MOVE,
|
||||||
|
|
Loading…
Reference in New Issue