Back to project page X3n0break.
The source code is released under:
GNU General Public License
If you think the Android project X3n0break listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.x3n0m0rph59.breakout; //from www .j ava2s. co m import com.badlogic.gdx.Gdx; public final class ForceFeedback { public static void ballLost() { vibrate(Config.VIBRATION_DURATION_BALL_LOST); } public static void wallHit() { vibrate(Config.VIBRATION_DURATION_BALL_VS_WALL); } public static void brickHit(Brick.Type type) { if (type == Brick.Type.HARD) vibrate(Config.VIBRATION_DURATION_BALL_VS_BRICK); } public static void brickDestroyed(Brick.Type type) { vibrate(Config.VIBRATION_DURATION_BRICK_DESTROYED); } public static void paddleHit() { vibrate(Config.VIBRATION_DURATION_BALL_VS_PADDLE); } public static void spaceBombExplosion() { vibrate(Config.VIBRATION_DURATION_SPACEBOMB_EXPLOSION); } public static void vibrate(int milliseconds) { Gdx.input.vibrate(milliseconds); } }