swansong

update gui textblock

Recommended Posts

I have a textblock on my gui that counts how many shots I have taken in my game. I increment the shot counter successfully but I don't know how to change the number currently displayed on the screen. Here is what I am trying (unsuccessfully).

 

scene.actionManager.registerAction(new BABYLON.ExecuteCodeAction({ trigger: BABYLON.ActionManager.OnEveryFrameTrigger},
              function () {
                    text13.text = shots.toString();
                    
                    advancedTexture.update();
            }));

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.