Search the Community
Showing results for tags 'tetris.phaser'.
Found 1 result
Hi i made a Tetris variant - Tetris in reverse so iI called it Retris, u must sort the elements like shown in the screen. The drag and drop is'nt the phaser default function because there are groups and not single sprites. The grid/snap moving is a simple formula: ---- in the update function: curMouseX = game.input.activePointer.x -difX; rasterStepsX = Math.floor(curMouseX/gridTile) *gridTile; puzzleTiles[actSprite].x = rasterStepsX; -- gridTile are 32px so the Math.floor cuts the movement in steps just as simple as that. So leave me some feedback if u want: Retris