- Home /
 
 
               Question by 
               espresso_0 · Oct 17, 2013 at 06:20 PM · 
                javascriptpuzzle  
              
 
              Help scrolling puzzle is not.
 var objbox : GameObject[];
 var node : Transform;
 var numX : int = 0;
 var numY : int = 0;
     
 
 
 function Start () {
     CreatePuzzle ();
 }
 
 function Update () {
     
 }
 
 function CreatePuzzle () {
         
         for(var i=0;i<7;i++)
         {
             for(var j=0;j<6;j++)
                 {
                     Create[i,j] = -1;
                     Create[i,j] = Random.Range(4,8);    
                     Create[0,0] = 0;
                     Create[2,4] = 1;
                     Create[4,3] = 2;
                     Create[6,5] = 3;                            
                     Instantiate(objbox[Create[i,j]],new Vector3(node.position.x+numX,node.position.y+numY,node.position.z), Quaternion.identity);
                     numX += 16;
                 }
                 numX = 0;
                 numY += 16; 
             }
             numY += 0;
 }
 
 function SlideRow () {
     var row : int = 0;
     var temp = Create[row,0];
     for(var column = 1;column<7;column++)
     {
         Create[row,column-1] = Create[row,column];
     }
 }
 
 function OnMouseDown () {
     row = 2;
     SlideRow ();
 }
 
               I want to slide and drag the puzzle is the movement on the X axis. I use array 7*6 this image. Now,it can not move. I am not able to solve. Please help T T
Thank you. 
 
                 
                untitled.jpg 
                (45.4 kB) 
               
 
              
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
A node in a childnode? 1 Answer
Stopping a function when another function running. 2 Answers
Cube terrain with perlin noise 1 Answer
UnityEngine has no appropriate version problem 1 Answer
Singletons in music script? 2 Answers