The only problem I have detected is that the player only moves when a key is pressed. The pac-man should move in the last direction taken until a wall is encountered unless directed to turn at the next junction.
@dadansi, please do not post material totally unrelated to a scenario in the commenting section of that scenario. Also, do not specifically ask for my help, as others may want to give some sort of input.
@Wayne, you can have a 'canMove' method that can check to see if the player can move in the direction it is facing using:
return ((Cell)getOneIntersectingObject(Cell.class)).blocked[getRotation()/90] == false;
If you have issues with this, start a discussion thread instead of posting here.
The problem is you are creating multiple instances of the GreenfootSound class (and probably using 'Greenfoot.playSound(String filename)' to play them. Create only one GreenfootSound object either in the world constructor or when declaring the field that is to hold it:
private GreenfootSound sound = new GreenfootSound(filename);
Then use:
sound.play();
to play the sound.
2017/7/8
Zombie Shooter Demo
2017/7/8
Zombie Shooter Demo
2017/6/13
3D Motion Demo
2017/6/12
Pac-Man
2017/6/10
Fractal Fun
2017/6/10
Fractal Fun
2017/6/1
Virtual Cube
2017/5/22
Maze Generator
2017/5/18
Sounds(Broken)