Last one for today. Thank you to all of those who really help me here!!
this works (as long as I am in L1):
L1=World
mouse=Actor
getMouse - in Level
Now I can work with those ints.
Now I want to change the world - so I need to change the code. Could I do this with a void?
I tried it with
but this did not work (as expected). Is there an easier way to do it? (I would rather have a void than if(World ==) - becuase I have alot of world currently.
A other question: As far as I can see in the documentation getWorld() returns the current world. Is this correct?
Thanks
PStiger
L1 w = (L1) getWorld(); mouse m = w.getMouse(); int x = m.getX(); int y = m.getY(); int r = m.getRotation();
public L1() { [...] theMouse = new mouse(); addObject(theMouse,100,300); } public mouse getMouse() { return theMouse; }
World(getWorld()); --------------------------------------- private void World(string X){ X w = (X) getWorld(); mouse m = w.getMouse();}