diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-09-03 07:13:45 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-09-03 07:13:45 (GMT) |
commit | 9be190b01a0a74d133958b030f52656282f31175 (patch) | |
tree | 6cefbd6917fb2f79917db8bc6018d16416431f99 /examples/declarative | |
parent | 4dd241331b9c906fe166184f7111f915ed8c00c0 (diff) | |
download | Qt-9be190b01a0a74d133958b030f52656282f31175.zip Qt-9be190b01a0a74d133958b030f52656282f31175.tar.gz Qt-9be190b01a0a74d133958b030f52656282f31175.tar.bz2 |
Fix the same bug that was in the demo samegame, in the tutorial version
Diffstat (limited to 'examples/declarative')
-rwxr-xr-x | examples/declarative/tutorials/samegame/samegame4/content/samegame.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js index b1f427c..79ff0c1 100755 --- a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js +++ b/examples/declarative/tutorials/samegame/samegame4/content/samegame.js @@ -127,7 +127,7 @@ function shuffleDown() { } else { if (fallDist > 0) { var obj = board[index(column, row)]; - obj.y += fallDist * gameCanvas.blockSize; + obj.y = (row + fallDist) * gameCanvas.blockSize; board[index(column, row + fallDist)] = obj; board[index(column, row)] = null; } @@ -145,7 +145,7 @@ function shuffleDown() { obj = board[index(column, row)]; if (obj == null) continue; - obj.x -= fallDist * gameCanvas.blockSize; + obj.x = (fallDist - column) * gameCanvas.blockSize; board[index(column - fallDist, row)] = obj; board[index(column, row)] = null; } |