Hi! I have a class called 'Bird' which extends Actor in Greenfoot. Inside the code of the class 'Bird' there is a variable which is:
I need to access this score from another class called 'MenuScore' this is because I want to display this score on the menu. To do that I think the only way is to declare that same integer from the 'MenuScore' class. Is this possible? I've tried changing that Integer from private to public and then specifying a getter and setter. Is there any way I can do this, and please provide an example because it'll really help later into my game. Any help is appreciated!
Thank You,
Mint_Greenie
public int score = 0;