Rafus Posted October 17, 2013 Share Posted October 17, 2013 Hi,Can any one tell me how to remove text screen.When i want to remove sprite then i usesprite.kill() but there isn't anytext.kill(); Link to comment Share on other sites More sharing options...
rich Posted October 17, 2013 Share Posted October 17, 2013 I was going to suggest you just do:game.world.remove(textThing);but it threw an error So I fixed that in the dev branch and also added a Text.destroy function at the same time. Is now pushed to github. Link to comment Share on other sites More sharing options...
Rafus Posted October 17, 2013 Author Share Posted October 17, 2013 thanks man Link to comment Share on other sites More sharing options...
Rafus Posted October 18, 2013 Author Share Posted October 18, 2013 I have one more problem,When i added TweenLite library then i have an error. Is there any way to use this library with phaser? Link to comment Share on other sites More sharing options...
rich Posted October 18, 2013 Share Posted October 18, 2013 Never tried it, but I can't see why it wouldn't work - what is the actual error? Link to comment Share on other sites More sharing options...
claire Posted October 21, 2013 Share Posted October 21, 2013 I was going to suggest you just do:game.world.remove(textThing);but it threw an error So I fixed that in the dev branch and also added a Text.destroy function at the same time. Is now pushed to github. Hi, I tried this, but it's not working.1) I want to remove a bitmap font from the state, how to do that?2) I want to change the text, normal text can use text.content = '', but bitmap font cannot, any idea how to change the text? Link to comment Share on other sites More sharing options...
onedayitwillmake Posted October 24, 2013 Share Posted October 24, 2013 Is there any reason why it's called destroy and not kill? Link to comment Share on other sites More sharing options...
rich Posted October 24, 2013 Share Posted October 24, 2013 kill and destroy do two different things. kill halts rendering and sets the object into dead, but still existing. I.e. it can be recycled for future use without incuring the cost of creating the object again. destroy kills everything to do with the object, references to game, input, etc. Use it when you want the object to be garbage collected. Link to comment Share on other sites More sharing options...
Recommended Posts