Advertisement
Guest User

grid array adjustment

a guest
Sep 15th, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(gridArray[c][r] == "emptyspot")
  2.         {
  3.             Instantiate(obj_BlankSpot, Vector3 (currentX, currentY, 0), Quaternion.identity);  //this object is a blank square where a player can place an orb
  4.             //blankSpotScript.xCoord = c; //blankSpotScript allows me to access the x and y variables in the script attached to obj_BlankSpot
  5.             //blankSpotScript.yCoord = r; //blankSpotScript allows me to access the x and y variables in the script attached to obj_BlankSpot
  6.             print (blankSpotScript.xCoord);
  7.             print (blankSpotScript.yCoord);
  8.         }
  9.    
  10.         else if(gridArray[c][r] == "blankorb")
  11.         {
  12.         Instantiate(obj_PlacedBlankOrb, Vector3 (currentX, currentY, 0), Quaternion.identity); // this object is a square that hold a blank orb that can be broken
  13.         //blankOrbScript.xCoord = c; //blankOrbScript allows me to access the x and y variables in the script attached to obj_PlacedBlankOrb
  14.         //blankOrbScript.yCoord = r; //blankOrbScript allows me to access the x and y variables in the script attached to obj_PlacedBlankOrb
  15.         print (blankOrbScript.xCoord);
  16.         print (blankOrbScript.yCoord);
  17.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement