blockrain.js
blockrain.js copied to clipboard
Show upcoming/next block
The original Tetris show the upcoming/next block somewhere. Didn't see it immediately in the demo or options.
+1
:+1:
+1
+1
+1
+1
Almost 2 years later I assume there's not going to be a preview added?
@zfbTony Probably not, but we'd be happy to accept a PR with that feature!
On file blockrain.jquery.src.js, at line 35, add:
// When next shape is generated
onNext: function(next){}
and at line 755, add:
game.options.onNext.call(game.element, this.next);
On constructor, add a method:
onNext: function (next) {
console.log(next.blockType)
}
So you can use it to your preview.