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

2012/4/23

Set to same level - why does this not work?

PStigerID PStigerID

2012/4/23

#
                Greenfoot.setWorld(new getWorld());  
This doesnt work. How could this be done correctly? Thx PStiger
danpost danpost

2012/4/23

#
Replace getWorld() with the name of your world. Example: if your sub-class of World is 'Arena', then 'Greenfoot.setWorld(new Arena());'
PStigerID PStigerID

2012/4/23

#
Hi Danpost, thx for your answer. Is there a way with getWorld() ? Because I have one actor which I use in multiple words, and more code would be easier then making multiple actors... -PStiger
danpost danpost

2012/4/23

#
Just create a world constructor to recieve the actor. Example (still using 'Arena', and adding actor Player class 'player'): 'Greenfoot.setWorld(new Arena(player));'.
You need to login to post a reply.