how does the rectangle bounds (x,y,width,height) in libgdx work

Posted by JG22 on Game Development See other posts from Game Development or by JG22
Published on 2012-04-07T21:37:28Z Indexed on 2012/04/07 23:45 UTC
Read the original article Hit count: 275

Filed under:
|

I cant work out how to use the rectangle bounds in libgdx I am currently using the superJumper example and have 2or 3 examples with that are

pause Bounds = new Rectangle(320 - 64, 480 - 64, 64, 64); this is the pause button in the top right corner resume Bounds = new Rectangle(160 - 96, 240, 192, 36); this is a rectangle resume button in the middle of the page in the menu that comes up when the pause button is pressed.

basically my question is aimed at the 360 -64 and 160 -96 because I don't know why this is used I need to create a rectangle that covers the left side of the screen and the same on the right because I want to create a on screen buttons, I have already created the does for these buttons and I have managed to get them to work but I can move the rectangles to where I want. Thank you If you can help

© Game Development or respective owner

Related posts about android

Related posts about libgdx