swansong Posted December 8, 2017 Share Posted December 8, 2017 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(); })); Quote Link to comment Share on other sites More sharing options...
Arte Posted December 8, 2017 Share Posted December 8, 2017 Hi @swansong Can you create simple PlayGround? Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted December 8, 2017 Share Posted December 8, 2017 Hi @swansong https://www.babylonjs-playground.com/#XCPP9Y#346 GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.