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


Get coordinates from world and put it an actor class?

The_Mac The_Mac


Is it possible to get coordinates from the world class and put it an actor class? It is needed to be done from the actor class! If you don't understand, write and ill try to specify.
davmac davmac


I don't understand! Perhaps you can explain what you're trying to achieve.
MathManiac MathManiac


World currentWorld;
public WorldInfo(World w) {
currentWorld = w;
addActor(new WorldInfo(this));
Put the first piece of code in your Actor, and the second piece in the World.
You need to login to post a reply.