HI all,
i am trying to have a score variable on all classes (world and actors) how can I do this
private int score; public int getScore() {return score;} //you might want these too: public void setScore(int newScore) {score = newScore;} public void addScore(int amount) {score += amount;}
((MyWorld) getWorld()).getScore(); //replace MyWorld with your world class name