This is a confusing way to compare locations:
(stillObject.getX() - 100) + playerObject.getX()) < -200)
what is the code supposed to be doing?
Type: Posts; User: Norm
This is a confusing way to compare locations:
(stillObject.getX() - 100) + playerObject.getX()) < -200)
what is the code supposed to be doing?
In general its better to use variables. There might be a time when they will be changed.
Using a named variable also makes the code more understandable.
You will have to know which way is...
The way I debug these kinds of problems is by taking a piece of paper and drawing the shapes all the different ways that there can be a collision and then looking at the x,y & width,height of both...