DrenSkywalker

Terrain

Oct 10th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.91 KB | None | 0 0
  1. public class Terrain {
  2.    
  3.     protected int posX;
  4.     protected int posY;
  5.    
  6.     protected int width;
  7.     protected int height;
  8.  
  9.     private int cellSize;
  10.    
  11.     public Terrain(int x, int y, int width, int height, int cellSize){
  12.         setPosX(x);
  13.         setPosY(y);
  14.         setWidth(width);
  15.         setHeight(height);
  16.         setCellSize(cellSize);
  17.     }
  18.    
  19.     protected int getWidth() {
  20.         return width;
  21.     }
  22.    
  23.     protected void setWidth(int width) {
  24.         this.width = width;
  25.     }
  26.  
  27.     protected int getHeight() {
  28.         return height;
  29.     }
  30.  
  31.     protected void setHeight(int height) {
  32.         this.height = height;
  33.     }
  34.  
  35.     protected int getPosX() {
  36.         return posX;
  37.     }
  38.  
  39.     protected void setPosX(int posX) {
  40.         this.posX = posX;
  41.     }
  42.  
  43.     protected int getPosY() {
  44.         return posY;
  45.     }
  46.  
  47.     protected void setPosY(int posY) {
  48.         this.posY = posY;
  49.     }
  50.  
  51.     public int getCellSize() {
  52.         return cellSize;
  53.     }
  54.  
  55.     public void setCellSize(int cellSize) {
  56.         this.cellSize = cellSize;
  57.     }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment