Jump to content

How to make lies02sprite.kill(); visible again ?


vmars316
 Share

Recommended Posts

Hello & Thanks ,

Once I have killed a sprite ,  how can I make it visible again ?    

function collisionLies02 (obj1, obj2) {
    bullet.body.velocity.y = -500;
    bullet.kill();
    lies02sprite.kill();
    scoreLiess();
//    lies02sprite.create(); 
//    lies02sprite.image.visible = true;
}

Thanks

Link to comment
Share on other sites

Yes ,  http://phaser.io/docs/2.4.4/index is a great resource .

The prob for a noob though is not knowing what word to look for .

I finally got there by thinking :

Lets see now , if  .kill()  operates on a sprite . Probably the opposite of kill will be a sprite method also . A look thru sprite methods , a promising one is 'reset' .

So I used that . Which works fine .  When would I use  revive ?

Thanks

Link to comment
Share on other sites

On 1/31/2016 at 2:25 PM, vmars316 said:

Yes ,  http://phaser.io/docs/2.4.4/index is a great resource .

The prob for a noob though is not knowing what word to look for .

I finally got there by thinking :

Lets see now , if  .kill()  operates on a sprite . Probably the opposite of kill will be a sprite method also . A look thru sprite methods , a promising one is 'reset' .

So I used that . Which works fine .  When would I use  revive ?

Thanks

Guess I'll answer my own Post:

I just found out about the improved Phaser Docs here:

http://phaser.io/learn/chains 

Great stuff !

Thanks   Arian Fornaris (@boniatillo_com)

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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