View updateThreadExample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mEngine.runOnUpdateThread(new Runnable() { | |
@Override | |
public void run() { Debug.d("Message 1") } | |
}); | |
mEngine.runOnUpdateThread(new Runnable() { | |
@Override | |
public void run() { Debug.d("Message 2") } | |
}); |
View removeBody.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final PhysicsConnector physicsConnector = | |
physicsWorld.getPhysicsConnectorManager().findPhysicsConnectorByShape(shape); | |
mEngine.runOnUpdateThread(new Runnable() | |
{ | |
@Override | |
public void run() | |
{ | |
if (physicsConnector != null) | |
{ |
View terrainAttempt.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates a top layer to the cave.. for now simply camera wide and height. | |
* It is built from trapezoids, so there will be no issue with convexity. | |
*/ | |
private void createTerrain(final PhysicsWorld pPhysicsWorld, | |
IEntity attachTo, final Random rand) { | |
// we'll use this multiple times so let's save a reference here | |
VertexBufferObjectManager vboMan = this.getVertexBufferObjectManager(); | |