Skip to content

Instantly share code, notes, and snippets.

@railsstudent
Created March 9, 2014 11:50
Show Gist options
  • Save railsstudent/9446624 to your computer and use it in GitHub Desktop.
Save railsstudent/9446624 to your computer and use it in GitHub Desktop.
@Override
protected void actionOnTouch(float x, float y) {
//Increase/decrease the speed of the ball making the ball move towards the touch
mBallX = x;
mBallY = y;
mBallSpeedX *= 2;
mBallSpeedY *= 2;
// mBallSpeedX = x - mBallX;
// mBallSpeedY = y - mBallY;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment