GreenfootSound frenzyMusic = new GreenfootSound("frenzy. GreenfootSound victoryMusic = new GreenfootSound("victory.wav") GreenfootSound myMusic = new GreenfootSound("start.wav") * Mod 1, new sound file made which is background music. ![]() Each act of each actor in the active world is executed each cycle. Each act cycle, you are doubling the number of actors in the world. doubling the number of objects with each click. ShowText("Your final score:" + score, 390, 180) If the world has one object then it creates one more object with the first click and two objects with the second click, 4 objects with the third click and so on. * Excercise 5.56 Another private method that will display a message if we survive until the timer runs out. * Excercise 5.54 New method named countTime to have timer count down by 1. * Excercise 5.53 New method named showTime and will display time on the top right. * Excercise 5.51 Added instance variable of int time * Excercise 5.46 New private method called showScore(). * Mod 2 Has a game over screen and plays lose music. * Excercise 5.50 Game over function has been moved into the addScore method and an if statemnt has been created so that whne the points are below 0, the game is over. * Excercise 5.43 New method to expect a parameter for points. * Excercise 5.40 New public method called addScore. * Excercise 5.38 Score variable moved to Bloodstream. * Excercise 5.47 showScore method is called to have score displayed on the start of the game. * Excercise 5.28 Code was added to make the border objects appear on top of other objects. * Excercise 5.27 The white cell's position was changed so that it wasn't so close to the border. * a white blood cell and the lining at the edge of the blood stream. * Prepare the world for the start of the program. * Excercise 5.23 Adds red blood cells into the bloodstream.ĪddObject(new Kirb(), 778, Greenfoot.getRandomNumber(360)) * Excercise 5.10 Adds new virus at right edge of the screen.ĪddObject(new Gordo(), 778, Greenfoot.getRandomNumber(360)) if (Greenfoot.getRandomNumber(100) < 1) * Excercise 5.8 New lining will appear on the right side on the top and bottom to make it seem as if the lining is infinite and continiously moving. * Create new floating objects at irregular intervals.ĪddObject(new Tomato(), 779, Greenfoot.getRandomNumber(360)) ![]() * Constructor: Set up the starting objects. * It's a place where blood cells, bacteria and viruses float around. * The bloodstream is the setting for our White Blood Cell scenario. Import greenfoot.* // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |