Jump to content

How can I delete particles when...


totallybueno
 Share

Recommended Posts

Hi there,

so here´s my question... I have a game, you´re under the water and at some point you launch some particles (bubbles).

 

What I want is to deleted those particles when they arrive to de surface but I don´t know how to do that, I don´t know if I should extend de particle class or if there´s another method.

 

Note: I can´t use checkWorldBounds because not all the stage (world) is water.

 

 

 

post-2171-0-31987600-1409654667.png

Link to comment
Share on other sites

Not sure if you should be manually changing the world bounds like that - it may have other repercussions, as it should normally not be smaller than the screen. Also, checking world bounds is quite a bit less efficient as bounds checks have to be done each time. As the particles are small and evenly sized, just checking their y property should be enough to get what you want.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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