- Home /
Javascript for simple grid puzzle?
I'm trying to create a simple grid puzzle using Javascript, which I've just started to learn. The grid would consist of many blocks that can be combined to create new types of block.
Example: Block Type A is dragged over Block Type B to create Block Type C. Blocks A and B are destroyed - Block C instantiates in the place of Block B.
I know the basics of destroying and instatiating prefabs on collision, etc, but if someone could give me some pointers on how to set up the initial grid, that would be great. I also don't know how to implement the click-and-drag mechanic.
Thanks!
Answer by Lttldude · Apr 10, 2012 at 08:15 AM
Some resources to get you started:
http://www.unifycommunity.com/wiki/index.php?title=DragObject
http://www.unifycommunity.com/wiki/index.php?title=Creating_a_Drag_and_Drop_Spell_Bar
Good Luck.
Your answer
Follow this Question
Related Questions
Snap to grid after click and drag? 2 Answers
Resizable grid of gameobjects 1 Answer
Swipe Movement On A Grid 1 Answer
Detect face of cube clicked 4 Answers
Grid Based Movement (Pokemon-like) 1 Answer