![]() ![]() This terminology wont make a lot of sense yet, but we will revisit it again. What you have done here is to add an instance (object) of the class Wombat. We can click on the actor (wombat in this case), then hold down shift, or right click the actor and select new Wombat(). There are two ways of doings this manually. Nothing will happen, so don t be surprised as we haven t actually told it to do anything! Lets add our first actor to our world. Click the run button in the Controls area. If any of your classes are grey, then they haven t been compliled 1ΔΆ Adding Objects to Your World We will see later how we can automatically add objects to the world, but in the meantime we can add these manually when the scenario is running. Compile allows you to turn you code into machine code that the computer understands. ![]() Use these buttons to run your code once it s compiled. leaf) that you want to have in your world. You will have to make an Actor class for each type of object (e.g. To the right we see the class and underneath we see how it looks visually. ![]() When you open this you see the following: This represents a world that we have named and created. Choose the Scenario, then Open and select Wombat. GREENFOOT PDF INSTALLGreenfoot creates scenarios (projects) that allow us to create a variety of programs such as games and simulations Lets open a scenario called Wombats that comes as a default when you install greenfoot. 1 Introduction to Greenfoot Greenfoot is an IDE (Integrated Development Environment) that is built on Java. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |