Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GObject object = detectCollision(window, ball);
- if(object != NULL)
- {
- if(strcmp(getType(object), "GRect") == 0)
- {
- if(object == paddle)
- {
- YVelocity = -YVelocity;
- XVelocity = -XVelocity;
- move(ball, XVelocity, YVelocity);
- }
- else
- {
- YVelocity = -YVelocity;
- XVelocity = -XVelocity;
- move(ball, XVelocity, YVelocity);
- removeGWindow(window, object);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement