I'm trying to make Pacman Multiplayer,how would you an object that You cant pass...a barricade or block,thanks in advance


1 2 | move( 4 ); if (!getIntersectingObjects(Barrier. class ).isEmpty()) move(- 4 ); |
1 2 | move( 4 ); if (!getIntersectingObjects(Barrier. class ).isEmpty()) move(- 4 ); |
1 2 3 4 5 6 7 8 9 10 11 12 13 | public void checkCollision() { Actor Car = getOneIntersectingObject(Vehicle. class ); if (Car != null ) { Greenfoot.playSound( "crash.wav" ); Greenfoot.stop(); } } |
1 2 3 4 5 6 7 8 9 10 11 12 13 | public void checkCollision() { Actor Car = getOneIntersectingObject(Vehicle. class ); if (Car != null ) { Greenfoot.playSound( "crash.wav" ); Greenfoot.stop(); } } |