duck

duck

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