Time for action — creating a method to update the text information
To update these text objects, we will create the UpdateInfoText method. Each text object has a text field that stores the text string value. The content of this field will be drawn on the screen.
Add a new method called UpdateInfoText to the game class.
Method UpdateInfoText:Int()
Set the text fields of both objects corresponding to their purpose.
Since we created a separate method to update the info text objects, we can call it at any time we wish. Later on, we will do this in the OnUpdate event on the game class, but the OnRender event would be good, too.