Examples of attachToBody()


Examples of box2dLight.ChainLight.attachToBody()

    clearLights();
    for (int i = 0; i < BALLSNUM; i++) {
      ChainLight light = new ChainLight(
          rayHandler, RAYS_PER_BALL, null, LIGHT_DISTANCE, 1,
          new float[]{-5, 0, 0, 3, 5, 0});
      light.attachToBody(
          balls.get(i),
          MathUtils.random(0f, 360f));
      light.setColor(
          MathUtils.random(),
          MathUtils.random(),
View Full Code Here

Examples of box2dLight.ConeLight.attachToBody()

    clearLights();
    for (int i = 0; i < BALLSNUM; i++) {
      ConeLight light = new ConeLight(
          rayHandler, RAYS_PER_BALL, null, LIGHT_DISTANCE,
          0, 0, 0f, MathUtils.random(15f, 40f));
      light.attachToBody(
          balls.get(i),
          RADIUS / 2f, RADIUS / 2f, MathUtils.random(0f, 360f));
      light.setColor(
          MathUtils.random(),
          MathUtils.random(),
View Full Code Here

Examples of box2dLight.PointLight.attachToBody()

  void initPointLights() {
    clearLights();
    for (int i = 0; i < BALLSNUM; i++) {
      PointLight light = new PointLight(
          rayHandler, RAYS_PER_BALL, null, LIGHT_DISTANCE, 0f, 0f);
      light.attachToBody(balls.get(i), RADIUS / 2f, RADIUS / 2f);
      light.setColor(
          MathUtils.random(),
          MathUtils.random(),
          MathUtils.random(),
          1f);
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.