duck

duck

Jun 30th, 2010
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. public class Level
  4. {
  5.  
  6.     private LevelTile[] level;
  7.     private width;
  8.     private height;
  9.  
  10.     public Level (width : int, height : int)
  11.     {
  12.         level = new LevelTile[width,height];
  13.         this.width = width;
  14.         this.height = height;
  15.     }
  16.  
  17.     public LevelTile GetTile (x : int, y : int)
  18.     {
  19.         return level[x + y*height];
  20.     }
  21.    
  22.     public void SetTile (x : int, y : int, LevelTile tile)
  23.     {
  24.         level[x + y*height] = tile;
  25.     }
  26. }
Add Comment
Please, Sign In to add comment