Slide 1Slide 2Slide 3Slide 4Slide 5Slide 6Slide 7Slide 8Drawing3-8-2010Opening Discussion●Minute essays–Remembering Greenfoot methods.–Why did we have to cast the getWorld() call to a ConnectFourBoard?–Greenfoot in Greenfoot.getMouseInfo().Objective●We had gotten pretty close to having our city scenario be a game. In order to really make it work we need some more control over what is drawn.–Limit quantity alligator can eat in a time period and make it visible when it can eat again.–Display some text showing how many people have been eaten.–Consider the ability to destroy houses.Image and Drawing●Many of these things we can do with what we already know. Changing the image we haven't learned how to do yet though.●For this we need the GreenfootImage class. Let's go look at it in the API.–Three constructors–Draw methods–Get methods–Set methodsSwapping Images●We haven't worried too much about efficiency in most of the things we have done, but we will here.●Loading a redrawing images is inefficient. I want us to create two images for the alligator when it is created, and then swap between those.Text and Fonts●To signify how many people have been eaten I want to use an actor and write text to the image for that actor, then add that actor to the world.Other Additions●Most of the other things I want us to add simply require adding memories to the actors or the world and then putting proper logic into the act methods.Minute Essay●Do you have any questions about what we did today?●You should get me your design for the first project on
View Full Document