Example usage for com.badlogic.gdx.physics.box2d Body setSleepingAllowed

List of usage examples for com.badlogic.gdx.physics.box2d Body setSleepingAllowed

Introduction

In this page you can find the example usage for com.badlogic.gdx.physics.box2d Body setSleepingAllowed.

Prototype

public void setSleepingAllowed(boolean flag) 

Source Link

Document

You can disable sleeping on this body.

Usage

From source file:com.strategames.engine.gameobject.types.Icecube.java

License:Open Source License

@Override
protected void setupBody(Body body) {
    //      Gdx.app.debug("Icecube", "0");

    body.setTransform(body.getPosition(), getRotation() * MathUtils.degreesToRadians);

    int size = this.parts.size();
    for (int i = 0; i < size; i++) {
        Part part = this.parts.get(i);
        String name = part.getName();
        loader.attachFixture(body, name, i, fixtureDef);
    }//from w w w .jav  a2  s .co  m

    body.setSleepingAllowed(false);
}