Hi, I've been following the tutorial how to add text to the scenario. No problems there, I've added a constructor, filled the img with a string and have that string updated based on action....
But then the maddness starts. How to I add a second label? I've tried it with adding another label in world which works ok, but when I want to update this dynamically, the trouble starts. I fully duplicated the labels code in both the world and actor. This didnt work because Label was already declared in the world (I tried to add another public myActor(Label label) in the actor class. So, I figured the costructor is not reusable and I have to add another constructor.
I created another constructor, same code updated declerations but... it still needs to be accessible in the same actor that already has the first label
Can and how do I make two seperate labels accessible by the same actor? Both labels must be updated by actions that the actor does (will be more in the future). I have a feeling that I can reuse the 1st constructor. Is that so?
addObject (new myActor(label), getWidth()/2, getHeight()/2);