Hello.
I am following CS106A lectures from youtube and I'm stuck with one of the assignments.
I am building a Breakout game
Assignment PDF
I am encountering some difficulties on object collision department. I've created the method getCollidingObject() like instructions says.
Problem: When the ball collides with paddle the getCollidingObject method returns GRect and the
will return true.
When the ball collides with a brick, the getCollidingObject will return something (when I printed returned object out, it just said GRect with some parameters) but the check
does not work.
What I have tried to find out where the problem is:
1) I've printed out collision object when collided with bricks & paddle, both will return GRect object.
2) I've set getCollidingObject specifically to point to some random brick, it will return GRect object aswell.
Can't figure out where I'm going wrong.