SHARE
TWEET

Untitled

a guest Oct 19th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public BlockCommon getShape(String shapeType, String ID, float posX, float posY, float blockSizeX, float blockSizeY, float angle){
  2.         if(getBlock(ID)!= null){
  3.             remove(ID);
  4.         }
  5.         if(shapeType == null){
  6.             return null;
  7.         }
  8.         if(shapeType.equalsIgnoreCase(SHAPE_RECTANGLE)){
  9.             RectangleBlock rb = new RectangleBlock();
  10.             rb.create(posX, posY, blockSizeX, blockSizeY, angle);
  11.             blocks.add(rb);
  12.             rb.setID(ID);
  13.             return rb;
  14.  
  15.         } else if(shapeType.equalsIgnoreCase(SHAPE_CURVE)) {
  16.             CurveBlock c = new CurveBlock();
  17.             c.create(posX, posY, blockSizeX, blockSizeY, angle);
  18.             blocks.add(c);
  19.             c.setID(ID);
  20.             return c;
  21.        
  22.  
  23.         return null;
  24.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top