setPaintOrder() – allows you to control which Actors are displayed on top and which will appear behind.Some things that you should consider for your World:.You can add an act() method to your World (and you should!).Use your World (the class you created which inherits from World, not World itself) as you would a main method.The scenarios are run in “acts” where the act() method of every class gets called once per frame.Your World can contain methods that allow Actors to communicate.This is best accomplished by defining your Actors within the constructor of your World class.In many programs, you will want to keep a permanent reference to your Actors.Includes a number of global variables – world size, act() order, state of execution (is the game currently running), etc.Typically, the World will own the Actors.Your program begins by you creating a sub-class of World – defining your own game world.You can declare abstract sub-classes of Actor and then create sub-sub-classes – useful for creating related types of objects (I.e.(It is possible to create non-Actor classes within Greenfoot – useful for advanced projects).All objects that will move within the game world should be sub-classes of Actor.Numerous online resources for learning Greenfoot - įirst look at Greenfoot IDE, Actor and World creation Tutorial.The Greenroom – Discussion forum and resources for teachers, requires registration from teacher email address. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |