Jump to content

How to remove graphics and text object


spinnerbox
 Share

Recommended Posts

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?

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...