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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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