Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public BlockCommon getShape(String shapeType, String ID, float posX, float posY, float blockSizeX, float blockSizeY, float angle){
- if(getBlock(ID)!= null){
- remove(ID);
- }
- if(shapeType == null){
- return null;
- }
- if(shapeType.equalsIgnoreCase(SHAPE_RECTANGLE)){
- RectangleBlock rb = new RectangleBlock();
- rb.create(posX, posY, blockSizeX, blockSizeY, angle);
- blocks.add(rb);
- rb.setID(ID);
- return rb;
- } else if(shapeType.equalsIgnoreCase(SHAPE_CURVE)) {
- CurveBlock c = new CurveBlock();
- c.create(posX, posY, blockSizeX, blockSizeY, angle);
- blocks.add(c);
- c.setID(ID);
- return c;
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement