can anyone explain to me further about this method
boolean collidesWith
(Image, int, int, boolean)
i cant understand much of the two ints in the parameter.
can anyone help me?
can anyone explain to me further about this method
boolean collidesWith
(Image, int, int, boolean)
i cant understand much of the two ints in the parameter.
can anyone help me?
It would help a lot if you gave some context.
check the javadoc
;D Haven’t seen that before.
I think the answer is 42 though.
Oh how I love LMGTFY.
yeah, when someone showed me LMGTFY, I bookmarked it :P. whoever thought of it is a genious
my codes for the game is like this
if(spriteA.collidesWith(bulletImage, 18,18, true))
{
spriteA=null;
bulletImage=null;
the bulletImage just overlaps the sprite image
the 18 is the pixel size of the bulletImage.
Did i use this right?
(Note that is from the first Google result).
[quote]Parameters:
image - the Image to test for collision
x - the horizontal location of the Image’s upper left corner
y - the vertical location of the Image’s upper left corner
pixelLevel - true to test for collision on a pixel-by-pixel basis, false to test using simple bounds checking
[/quote]