YuShaN Posted October 30, 2015 Share Posted October 30, 2015 Hello everyone. I want make a text on state preload change base on time look likeLoading.Loading..Loading...Loading....Loading.....then loopLoading.....Someone help me. Thank you Link to comment Share on other sites More sharing options...
jmp909 Posted October 30, 2015 Share Posted October 30, 2015 http://phaser.io/sandbox/DGBFdmTM/play (i use dotCounter + 0.1 so that it only updates every 10 frames.)var dotCounter = 0;var dotMax = 5;var msg = "loading"function update() { loadingTxt.text = msg + (".").repeat(Math.floor(dotCounter)) dotCounter = (dotCounter+0.1)%(dotMax+1)} YuShaN and chongdashu 2 Link to comment Share on other sites More sharing options...
YuShaN Posted October 30, 2015 Author Share Posted October 30, 2015 http://phaser.io/sandbox/DGBFdmTM/play (i use dotCounter + 0.1 so that it only updates every 10 frames.)var dotCounter = 0;var dotMax = 5;var msg = "loading"function update() { loadingTxt.text = msg + (".").repeat(Math.floor(dotCounter)) dotCounter = (dotCounter+0.1)%(dotMax+1)} Thank you so much Link to comment Share on other sites More sharing options...
Recommended Posts