Guest User

Untitled

a guest
May 20th, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. public void AddVerticies (int x, int y, int z)
  2. {
  3. chunkX = x;
  4. chunkY = y;
  5. chunkZ = z;
  6.  
  7.  
  8. for (int xCounter = 0; xCounter < chunkX; xCounter++) {
  9. for (int yCounter = 0; yCounter < chunkY; yCounter++) {
  10. for (int zCounter = 0; zCounter < chunkZ; zCounter++) {
  11. if(xCounter == 0)
  12. {
  13. verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
  14. verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
  15. arrayCounter++;
  16. }
  17.  
  18. if(xCounter == chunkX)
  19. {
  20. verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
  21. arrayCounter++;
  22. }
  23. if(yCounter == 0)
  24. {
  25. verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
  26. arrayCounter++;
  27. }
  28.  
  29. if(yCounter == chunkY)
  30. {
  31. verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
  32. arrayCounter++;
  33. }
  34. if(zCounter == 0)
  35. {
  36. verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
  37. arrayCounter++;
  38. }
  39.  
  40. if(zCounter == chunkZ)
  41. {
  42. verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
  43. arrayCounter++;
  44. }
  45.  
  46. }
  47. }
  48.  
  49. }
  50.  
  51. }
Add Comment
Please, Sign In to add comment