User prompt
Don’t tick the bottom tile that is currently being dragged
User prompt
In tick call tick on bottom tiles
User prompt
in down set draggedTile = this;
User prompt
when creating a new tile in addBottomTiles attach a on down handler that sets draggedTile to this
User prompt
Remove the on down code from the tile class
Code edit (1 edits merged)
Please save this source code
User prompt
make instances of Tile in game draggable, write this code in game class. You can only drag one tile at once.
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'newPosition.x')' in this line: 'self.x = newPosition.x;' Line Number: 27
User prompt
Fix Bug: 'TypeError: undefined is not an object (evaluating 'self.dragData.getLocalPosition')' in this line: 'var newPosition = self.dragData.getLocalPosition(self.parent);' Line Number: 22
User prompt
make instances of Tile in game draggable
User prompt
Add an additional tile type that only have one cell
User prompt
In tile set tileGraphics alpha to .5
User prompt
call horizontalMargin margin and subtract it from posy
User prompt
remove bottomMargin
User prompt
in addBottomTiles when calculating posY also subtract half the height of a tile
User prompt
Fix Bug: 'ReferenceError: Can't find variable: posY' in this line: 'tile.move(posX, posY, true);' Line Number: 252
User prompt
delete both posY instances in addBottomTiles and just use gamehight -horizontalMargin when calling tile.move
Code edit (3 edits merged)
Please save this source code
User prompt
Delete the line that sets posY with -100 in the line
User prompt
In addBottomTiles you define posY twice, delete the instance inside the for loop
User prompt
you calculate posY twice in addBottomTiles delete the secound instance
User prompt
pos y in self.addBottomTiles should just be the same as horizontalMargin
Code edit (1 edits merged)
Please save this source code
User prompt
do not subtract 100 from the posY in addBottomTiles
User prompt
remove the additional bottomMargin in addBottomTiles
===================================================================
--- original.js
+++ change.js
@@ -248,9 +248,11 @@
if (grid[i][j]) grid[i][j].tick();
}
}
for (var i = 0; i < bottomTiles.length; i++) {
- bottomTiles[i].tick();
+ if (bottomTiles[i] !== draggedTile) {
+ bottomTiles[i].tick();
+ }
}
});
var bottomTiles = [];
var draggedTile = null;
Simple White square round corners. Vector. No details. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Hour hand. Vector. Simple Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Simple Awesome background for clock chain reaction game. Vector high contrast.