Advertisement
Guest User

Untitled

a guest
Oct 18th, 2011
445
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.96 KB | None | 0 0
  1. using System.Collections;
  2.  
  3. public class ChunkData {
  4.    
  5.     private int x,y,z;                          // Create 3 ints called x,y,z to store our position in our WorldData array
  6.    
  7.     // When ever our chunkData, we will send in
  8.     // The position it will be stored in the WorldData array
  9.     public ChunkData(int _x, int _y, int _z)
  10.     {
  11.         x = _x;
  12.         y = _y;
  13.         z = _z;
  14.     }
  15.    
  16.     // X,Y,Z Functions just allow us to get and set the value
  17.     // Of our vars x,y,z because they're private
  18.     public int X
  19.     {
  20.         get { return x; }
  21.         set { x = value; }
  22.     }
  23.  
  24.     public int Y
  25.     {
  26.         get { return y; }
  27.         set { y = value; }
  28.     }
  29.  
  30.     public int Z
  31.     {
  32.         get { return z; }
  33.     }
  34.    
  35.     // We will use this when renaming our chunk
  36.     // So it is something more readable and managable
  37.     // Instead of having them all name Chunk(clone)
  38.     public override string ToString()
  39.     {
  40.         return string.Format("Chunk ( {0},{1},{2} )", x,y,z);
  41.     }
  42. }
  43.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement