Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void AddVerticies (int x, int y, int z)
- {
- chunkX = x;
- chunkY = y;
- chunkZ = z;
- for (int xCounter = 0; xCounter < chunkX; xCounter++) {
- for (int yCounter = 0; yCounter < chunkY; yCounter++) {
- for (int zCounter = 0; zCounter < chunkZ; zCounter++) {
- if(xCounter == 0)
- {
- verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
- verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
- arrayCounter++;
- }
- if(xCounter == chunkX)
- {
- verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
- arrayCounter++;
- }
- if(yCounter == 0)
- {
- verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
- arrayCounter++;
- }
- if(yCounter == chunkY)
- {
- verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
- arrayCounter++;
- }
- if(zCounter == 0)
- {
- verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
- arrayCounter++;
- }
- if(zCounter == chunkZ)
- {
- verticies[arrayCounter] = new Vector3(xCounter, yCounter, zCounter);
- arrayCounter++;
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment