Advertisement
Guest User

Untitled

a guest
Oct 19th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. public void create(float blockPosX,float blockPosY,float blockSizeX,float blockSizeY,float angle){
  2. entityType = EntityCommon.ENTITY_TYPE_BLOCK;
  3. this.setPosition(blockPosX* GameScreen.BLOC_SIZE, blockPosY*GameScreen.BLOC_SIZE);
  4. this.setSize(blockSizeX * GameScreen.BLOC_SIZE, blockSizeY * GameScreen.BLOC_SIZE);
  5. this.setOrigin(this.getWidth()/2,this.getHeight()/2);
  6. this.setRotation(angle);
  7. bodyDef = new BodyDef();
  8. bodyDef.type = BodyDef.BodyType.StaticBody;
  9. fixtureDef = new FixtureDef();
  10. fixtureDef.friction=0;
  11. isBouncy = false;
  12. GameScreen.getInstance().getGameStage().addActor(this);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement