spinnerbox Posted May 5, 2016 Share Posted May 5, 2016 I have this object called LetterBox: letterBox = { graphics: null, boxText: null }; I use this code to initialize the two parts: letterBox.graphics = gameObject.add.graphics(0, 0); letterBox.boxText = gameObject.add.text(boxX, boxY, textData); What is the best way to cleare these two object? There is Phaser.Graphics.removeChild(DisplayObject), but should I use this method like this trough top level class? How about the text, how should I remove it? zac 1 Link to comment Share on other sites More sharing options...
spinnerbox Posted May 5, 2016 Author Share Posted May 5, 2016 Really noob question: letterBox.boxText.destroy(); letterBox.graphics.destroy(); Link to comment Share on other sites More sharing options...
Recommended Posts