Created
November 24, 2015 06:45
-
-
Save mm-uddin/90c9ceeed6416560f13d to your computer and use it in GitHub Desktop.
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
//This is run whenever the phone is touched by the user | |
@Override | |
protected void actionOnTouch(float x, float y) { | |
//Increase/decrease the speed of the ball making the ball move towards the touch | |
mBallSpeedX = 2*(x - mBallX); | |
mBallSpeedY = 2*(y - mBallY); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment