Hello.
Sorry if this is the wrong place to post a question like this, but there is a line of code that we write during one of the lectures while making the prison game that I do not full understand. It works just fine, but it drives me mad when I have written something that I don’t fully appreciate!
Anyway the line is:
public Text text;
It’s the first line, but I’m a little confused as to how it works. We are declaring Text as public, I suppose. The problem is, we have an object called ‘Text’ (our text box), but Text also contains a field called ‘Text’. So I’m confused which we are pointing to in this case. As to what the lowercase ‘text’ is for I have no idea.
Anyway, I’m aware this probably isn’t very clear, but if you’ve done this section then I’m sure you know what I mean! Thanks!
Thom