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

 Share

  • Recently Browsing   0 members

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