Jump to content

How do i kill this sprites


henrikkee
 Share

Recommended Posts

Hello,

 

I'm doing a menu that is this:

 

if(enterButton.isDown && player.x > 172 && player.x < 315){interfacel = game.add.image(50,100,'lojai')texto = game.add.text(360,160, "Loja", estilot);cvidas = game.add.button(100,240,'lojao',this.comprouvida,this,1,0);coracao = game.add.sprite(120,260,'sprites','coracao1');cescudo = game.add.button(100,350,'lojao',this.comprouescudo,this,1,0);escudop = game.add.sprite(120,370,'sprites','escudo')tvidas = game.add.text(180,260, "Comprar uma vida     10", estilot);tescudo = game.add.text(180,370, "Comprar um Escudo     6", estilot);voltar = game.add.button(500,520,'voltar',this.fecharloja); }

and if i click in that button ''voltar'' i put that will destroy like this:

interfacel.destroy

or that

interfacel.kill

but none of them disappear with the images how can i do that?

 

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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