summaryrefslogtreecommitdiffstats
path: root/demos/declarative/samegame/SamegameCore/samegame.js
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/samegame/SamegameCore/samegame.js')
-rwxr-xr-xdemos/declarative/samegame/SamegameCore/samegame.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js
index 5c008a2..6e1b24d 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.targetY += fallDist * gameCanvas.blockSize;
+ obj.y += 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.targetX -= fallDist * gameCanvas.blockSize;
+ obj.x -= fallDist * gameCanvas.blockSize;
board[index(column-fallDist,row)] = obj;
board[index(column,row)] = null;
}
@@ -184,8 +184,7 @@ function createBlock(column,row){
}
dynamicObject.type = Math.floor(Math.random() * 3);
dynamicObject.x = column*gameCanvas.blockSize;
- dynamicObject.targetX = column*gameCanvas.blockSize;
- dynamicObject.targetY = row*gameCanvas.blockSize;
+ dynamicObject.y = row*gameCanvas.blockSize;
dynamicObject.width = gameCanvas.blockSize;
dynamicObject.height = gameCanvas.blockSize;
dynamicObject.spawned = true;