Package com.badlogic.gdx.physics.box2d

Examples of com.badlogic.gdx.physics.box2d.PolygonShape.dispose()


    boxPoly.setAsBox(halfWidth, halfHeight);
    pFixtureDef.shape = boxPoly;

    boxBody.createFixture(pFixtureDef);

    boxPoly.dispose();

    boxBody.setTransform(boxBody.getWorldCenter(), MathUtils.degToRad(pRotation));

    return boxBody;
  }
View Full Code Here


    linePoly.setAsEdge(new Vector2(pX1 / pPixelToMeterRatio, pY1 / pPixelToMeterRatio), new Vector2(pX2 / pPixelToMeterRatio, pY2 / pPixelToMeterRatio));
    pFixtureDef.shape = linePoly;
   
    boxBody.createFixture(pFixtureDef);
   
    linePoly.dispose();
   
    return boxBody;
  }

  /**
 
View Full Code Here

    boxPoly.set(pVertices);
    pFixtureDef.shape = boxPoly;

    boxBody.createFixture(pFixtureDef);

    boxPoly.dispose();

    return boxBody;
  }

View Full Code Here

      boxPoly.set(TMP_TRIANGLE);
      pFixtureDef.shape = boxPoly;

      boxBody.createFixture(pFixtureDef);

      boxPoly.dispose();
    }

    return boxBody;
  }
View Full Code Here

   
    body.setUserData(this);
   

    // we are done, all that's left is disposing the boxPoly
    boxPoly.dispose();
  }


  public void update(float delta) {
   
View Full Code Here

      // add the box to our list of boxes
      enemies.add(boxBody);
    }

    // we are done, all that's left is disposing the boxPoly
    boxPoly.dispose();
  }

  public void initRender() {
    Gdx.graphics.getGL20().glViewport(0, 0, Gdx.graphics.getWidth(),
        Gdx.graphics.getHeight());
View Full Code Here

    body = boxBody;
   
    body.setUserData(this);
   
    // we are done, all that's left is disposing the boxPoly
    boxPoly.dispose();
  }
 
  public void update(float delta) {
    if(life>0) {
      lastShot+= delta;
View Full Code Here

 
      FixtureDef fixtureDef = new FixtureDef();
      fixtureDef.shape = groundPoly;
      fixtureDef.filter.groupIndex = 0;
      groundBody.createFixture(fixtureDef);
      groundPoly.dispose();
    }
    {
      PolygonShape groundPoly = new PolygonShape();
      Vector2[] vertices = new Vector2[4]
     
View Full Code Here

 
      FixtureDef fixtureDef = new FixtureDef();
      fixtureDef.shape = groundPoly;
      fixtureDef.filter.groupIndex = 0;
      groundBody.createFixture(fixtureDef);
      groundPoly.dispose();
    }
   
    {
      PolygonShape groundPoly = new PolygonShape();
      Vector2[] vertices = new Vector2[4]
View Full Code Here

 
      FixtureDef fixtureDef = new FixtureDef();
      fixtureDef.shape = groundPoly;
      fixtureDef.filter.groupIndex = 0;
      groundBody.createFixture(fixtureDef);
      groundPoly.dispose();
    }
   
    {
      PolygonShape groundPoly = new PolygonShape();
      Vector2[] vertices = new Vector2[4]
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.