This site requires JavaScript, please enable it in your browser!
Greenfoot back
Matt
Matt wrote ...

2012/5/23

Levels

Matt Matt

2012/5/23

#
Hi, I would like to know how to implement levels into my Game. Any exampler of coding would be greatly appreciated :)
Denzien Denzien

2012/5/23

#
You need to add a new world class, each world class will be a different level to add a new level put:
if(<example>)
{
            World world;
            world = getWorld();
            Greenfoot.setWorld(new <world you want>());
}
Matt Matt

2012/5/23

#
Would that sort of coding just be added to the original "World" that's already been made? Would any of the actor coding need altering for different levels?
Denzien Denzien

2012/5/24

#
It would be added to the actor.
Matt Matt

2012/5/24

#
Thankyou :)
Denzien Denzien

2012/5/24

#
No problem :)
trash1000 trash1000

2012/5/24

#
Apart from different worlds you could always go and use files to read out the structure of a level. However, it's highly dependent on how your levels are structured.
You need to login to post a reply.