I have an integer "score" defined in the class Player. How do I get this integer in another class?
public int getScore()
{
return score;
}//in an Actor subclass in the same world int playerScore = ((Player)(getWorld().getObjects(Player.class).get(0)).getScore(); //in the World subclass in which the player is in int playerScore = ((Player)(getObjects(Player.class).get(0)).getScore();
public int getScore()
{
return score;
}//in an Actor subclass in the same world int playerScore = ((Player)(getWorld().getObjects(Player.class).get(0)).getScore();
//in the World subclass in which the player is in int playerScore = ((Player)(getObjects(Player.class).get(0)).getScore();