diff options
author | Lorn Potter <lorn.potter@nokia.com> | 2012-05-29 13:49:12 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-29 06:33:01 +0200 |
commit | a0b89b80c933cca852e62cc73208cdbc0d3dcc25 (patch) | |
tree | 2be55e9adeeb6a510657de433a4d2e7014f5b330 /examples/QtSensors/QtSensors_maze/lib.js | |
parent | e2fda7e34f1c8ff39a86800c14ec7cecb085c2af (diff) |
make mouse move better ine Maze example, add acceleration. Fix up docs
Use only one mouse gif and rotate it instead.
also add screensaver inhibit.
Change-Id: I4268bdec9346ee389e9b485e8c37d43a1e607128
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Diffstat (limited to 'examples/QtSensors/QtSensors_maze/lib.js')
-rw-r--r-- | examples/QtSensors/QtSensors_maze/lib.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/QtSensors/QtSensors_maze/lib.js b/examples/QtSensors/QtSensors_maze/lib.js index fccce18f..3bae6a86 100644 --- a/examples/QtSensors/QtSensors_maze/lib.js +++ b/examples/QtSensors/QtSensors_maze/lib.js @@ -228,19 +228,19 @@ function canMove(x, y) var dy = ycenter - (idy * cellDimension + ( cellDimension / 2 )); if (dx > 0){ - if (labyrinth[idx + 1][idy] == 1) + if (labyrinth[idx][idy] == 1) return false; } if (dx < 0){ - if (labyrinth[idx - 1][idy] == 1) + if (labyrinth[idx][idy] == 1) return false; } if (dy > 0){ - if (labyrinth[idx][idy + 1] == 1) + if (labyrinth[idx][idy] == 1) return false; } if (dy < 0){ - if (labyrinth[idx][idy - 1] == 1) + if (labyrinth[idx][idy] == 1) return false; } //check if won |