Advertisement
Guest User

Untitled

a guest
Jul 25th, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.11 KB | None | 0 0
  1. public boolean StackerBlocks[][];  //false = not light, true = light
  2.  
  3. OnEnable
  4. {
  5. StackerBlocks = new boolean[3][6];
  6.  
  7. for (int i =0; i< 3; i++) //set the scoreboard to false
  8. {
  9.         for (int b =0; b< 6; bi++)
  10.         {
  11.                 StackerBlocks[i][b] = false;
  12.         }
  13.  
  14. }
  15.  
  16. }
  17.  
  18. OnBlockHit (playerinteract)
  19. {
  20. int blockhity = e.getblock.getlocation.x;
  21. int blockhitz = e.getblock.getlocation.x;
  22.  
  23. int blockhitrow = 0;
  24. int blockhitcolumn = 0;
  25.  
  26. int miniscoreboardstartingx = 100; //never changes
  27. int miniscoreboardstartingy = 200; //changes blocks each row
  28. int miniscoreboardstartingz = 300; //changes 2 blocks each column
  29.  
  30. blockhitrow = ((blockhity - miniscoreboardstartingy) /2); //because miniscoreboard there is a block every 2 blocks.
  31. blockhitcolumn = ((blockhitz - miniscoreboardstartingz) /2);
  32.  
  33. if (StackerBlocks[blockhitrow][blockhitcolumn] == true) //block is light up
  34. {
  35.         if (StackerBlocks[blockhitrow][blockhitcolumn] == false)
  36.         {
  37.         //give player point, light up new block, check if player scored 10 to see if next level, play sound
  38.  
  39.         }
  40. }
  41.  
  42.  
  43.  
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement