2018-03-09 00:36:40 +01:00
|
|
|
if (!this.entityLoaded) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!this.initialized) {
|
|
|
|
this.initialized = true;
|
|
|
|
}
|
|
|
|
|
2018-03-09 15:43:31 +01:00
|
|
|
var left = false;
|
|
|
|
var right = false;
|
|
|
|
var leftAmount = 0;
|
|
|
|
var rightAmount = 0;
|
|
|
|
|
|
|
|
if (data.event.movementX < 0) {
|
|
|
|
left = true;
|
|
|
|
leftAmount = Math.abs(data.event.movementX);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (data.event.movementX > 0) {
|
|
|
|
right = true;
|
|
|
|
rightAmount = Math.abs(data.event.movementX);
|
|
|
|
}
|
|
|
|
|
|
|
|
this.entityLoaded.movement = {
|
|
|
|
left : left,
|
|
|
|
right : right
|
|
|
|
leftAmount : leftAmount,
|
|
|
|
rightAmount : rightAmount
|
|
|
|
};
|
|
|
|
|
2018-03-09 00:36:40 +01:00
|
|
|
//@ sourceURL=mouseMove.js
|