bukeelcin / Brick_Breaker

GROUP-A
0 stars 0 forks source link

OUTSIDE OF THE SCREEN #4

Open bukeelcin opened 10 years ago

bukeelcin commented 10 years ago

When I am controlling the floor, it overflows the screen horizontally. I think, this should not occur and how I eliminate this problem?

deniziskender commented 10 years ago

I think, the problem is on MyMouseListener class because the movement of floor depends on this class. When I solve it, I''ll inform you.

deniziskender commented 10 years ago

Aha. Here is your answer. Please be more careful about the boundaries of floor. When you just change the boundaries, you can achieve how it should behave. I have just changed MouseDragged method which is inside of MyMouseListener class. Here you can find correct method. public void mouseDragged(MouseEvent e) { if (0 < e.getX() - dx && e.getX() - dx < 484) floor.setX(e.getX() - dx); }

bukeelcin commented 10 years ago

Thank you for your answer.