![]() ![]() Passing the aforementioned String values to setDirection(String) method will set Clara's direction to the command you specify. You will need to use Clara's "setDirection(String)" method, which can be sent one of the following commands "up", "down", left" or "right" (a good idea is to use the same movement constants defined inside M圜lara rather than using those String literals inside your code). You may add extra functionality, such as controls for left handed players, but that is not compulsory. Next thing for you to do - is to make sure that Clara can be controlled with the arrow keys. Try starting with using () to print which of the keys was pressed to make yourself familiar with keyboard input. Try passing the movement constants defined inside M圜lara.java as input for Greenfoot.isKeyDown(String) and see what happens when you press the arrow keys. One of your first tasks - is to learn how to process keyboard input of the player by using Greenfoot.isKeyDown(String) method. All files must compile and the game must run. You must make, at a minimum, one extra level When Ghosts collide with the Ghost Healer they must no longer be dead When Ghosts are dead they must attempt to return to the Ghost Healer When Clara and a Ghost collide, and the Ghost is scared, the Ghost must die, play the appropriate sound and play the appropriate animation When the Ghosts are scared, they must run the appropriate animation Clara must be able to eat mushrooms, and this must make the Ghosts scared When Clara is dead the player must not be able to continue controlling her When Clara and a Ghost collide, and the Ghost is neither dead nor scared, she must die, and play the appropriate sound ![]() Ghosts must randomly decide on a direction to go in when they find themselves in an intersection Ghosts must move slower than Clara when moving normally and when scared When each level starts the intro sound must be played once for each level and Clara and the Ghosts must not be able to move until after the intro sound has completed playing When all the leaves are eaten, the game must progress to the next level ![]() Clara must be able to eat leaves, and play the appropriate sound when doing so Clara must stop before hitting trees or the ghost wall Clara must not move in the game until after an arrow key pressed Clara must be capable of being controlled with at least the arrow keys on the keyboard Clara and the Ghosts must be able to move from one side of the game to the other with the "wrapAroundWorld()" method So I don't really know what code to show you since I have almost 20+ classes.The major assignment involves producing a Pacman style game with Clara using the Greenfoot files that are given to you.įor your convenience, all important requirements specified in this brief are re-listed here: While im in the Menu (The music should go in a loop) and when i'm in the "game" it should end until I press a button that is back. ![]() Is to make this function with background music to work. which means it I do that multiply times, your ears will probably not like it. it starts the same song but from the beginning. But I could only make the background sound goes in loop and every time it jumps to the menu. the music should just end and until i'm pressing the "back" button which takes me back to the menu. So basically what i'm trying to do is to have a background music in my menu. Its only the sound that I'm having trouble with right now. I am almost done with my programming game which I can later on show to you guys when its done. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |