What do I have to do to be able to use a variable from world in one of my actor classes?


// CASE 1: if variable in world is 'public' int myWorldVar = ((MyWorld) getWorld()).myVar; // CASE 2: if variable in world is 'private' int myWorldVar = ((MyWorld) getWorld()).getMyVar(); // with the following method in the 'MyWorld' class public int getMyVar() { return myVar; }