summaryrefslogtreecommitdiffstats
path: root/demos/declarative
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-07-19 03:07:07 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-07-19 03:07:07 (GMT)
commit9e4fb690b864f8d0c05d70687a3498b9eb9b2ed5 (patch)
treebce0fb0feacd095541667b7514ca223a91a14973 /demos/declarative
parent53d3083eecf88a20bc36ada43942c7a18677af62 (diff)
downloadQt-9e4fb690b864f8d0c05d70687a3498b9eb9b2ed5.zip
Qt-9e4fb690b864f8d0c05d70687a3498b9eb9b2ed5.tar.gz
Qt-9e4fb690b864f8d0c05d70687a3498b9eb9b2ed5.tar.bz2
Fix Samegame
Change to Behavior from Follow means that some of the previous assumptions are now incorrect. Script logic has been fixed. Task-number: QTBUG-12246
Diffstat (limited to 'demos/declarative')
-rwxr-xr-xdemos/declarative/samegame/SamegameCore/samegame.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js
index 6e1b24d..aa1b359 100755
--- a/demos/declarative/samegame/SamegameCore/samegame.js
+++ b/demos/declarative/samegame/SamegameCore/samegame.js
@@ -110,7 +110,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;
}
@@ -128,7 +128,7 @@ function shuffleDown()
obj = board[index(column,row)];
if(obj == null)
continue;
- obj.x -= fallDist * gameCanvas.blockSize;
+ obj.x = (column-fallDist) * gameCanvas.blockSize;
board[index(column-fallDist,row)] = obj;
board[index(column,row)] = null;
}