Exemplo n.º 1
0
 @Override
 public void onAccelerometerChanged(final AccelerometerData pAccelerometerData) {
   final Vector2 gravity =
       Vector2Pool.obtain(pAccelerometerData.getX(), pAccelerometerData.getY());
   this.mPhysicsWorld.setGravity(gravity);
   Vector2Pool.recycle(gravity);
 }
 @Override
 public void onAccelerometerChanged(final AccelerometerData pAccelerometerData) {
   mTempVector.set(pAccelerometerData.getY(), pAccelerometerData.getX());
   mPhysicsWorld.setGravity(mTempVector);
 }