This is a real simple problem and I can’t find it anywhere, maybe I’m not asking it correctly.
I have been searching to do with TextView and changable text on google and on stackOverflow
I have made a game using andengine much like tetris / bejeweled and the game works fine, I need to add a scoring system and want to output the score to the screen.
Many questions related to text in android talk of TextView but when I use this I get a blank white screen with my text on it.
I want to be able to create a label, position it, and change the text regularly throughout the game.
I’d like to be able to do it without changing xml files as I’m not very good at that.
Thank you.
I worked out how to do it with help from a friend. I’m sure it’s very basic but it’s how I wanted to do it, without using XML files and having text that can be changed at anytime.
in OnLoadResources
in OnLoadScene
I used my text for a variable score to be shown later on in the game and everytime the player’s score increases I called the Score method.
This updated the score every frame as I called it from my update method.