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

2015/7/8

how to use a world method in an actor class ?

jaki jaki

2015/7/8

#
i need a method out of my worldclass that i wanted to use in a actor class pls help me
wabuilderman wabuilderman

2015/7/8

#
1st of all, there is a tutorial on this. Basically, what you do is you do something like this:
WorldName world = (WorldName) getWorld();
world.SomeMethod;
The tutorial is on how to access something in another object, but this is the halfway step. Since you seem to be a bit new to greenfoot, I suggest you go through all the tutorials. They are extremely helpful and will answer many of your questions.
jaki jaki

2015/7/9

#
ty dude <3 it works but you forgot the () xD
You need to login to post a reply.