Jump to content

How do i kill this sprites


Recommended Posts



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:


or that


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




Link to comment
Share on other sites


  • Recently Browsing   0 members

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