What is the field for? What is the name of the Actor subclass the field is in? How many instances of that class will be active at any one time (will there always be just one instance of the class in the world at any time)? What code are you trying to use in your World subclass to access it?
just one Actor subclass(player.class).i define int score=0,do something increase it. then i want to showtext(the score) in the world. beause of some reasons i don't want to use getWorld().showtext().can i find other ways?
just one Actor subclass(player.class).i define int score=0,do something increase it. then i want to showtext(the score) in the world. beause of some reasons i don't want to use getWorld().showtext().can i find other ways?
You might want to check out my Value Display Tutorial scenario which explains how to do that.