Search the Community

Showing results for tags 'checkall'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Coding and Game Design
  • Frameworks
    • Phaser
    • Pixi.js
    • Babylon.js
    • Panda.js
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Found 2 results

  1. Hi i need some help with my school assignment so what i want to do is to kill the children at the same time if all the children's y position more than 820. or if i can check all the position of the children or the group ( i dont think that possible). animals.forEach(function(animal) { var z=0; if (animal.y > 820) { z++; console.log(z); } if (z>6) {animal.kill();} } ); the number of the children is 5 and the problem is the number of z is always 1 therefor the animal.kill() never been process. thought?? or do you have better way to check the position? really appreciate the help guys thanks
  2. I'm looking to check the x value of all children of an emitter and kill it if x > 200. Here's my immediate non-phaser method solution (this is in the update loop) for (var i = 0, j = windEmitter.children.length; i < j; i++) { var s = windEmitter.children[i]; if (s.x > 200) { s.kill(); }}Seems like there's got to be a more efficient way to use a Phaser.Group method ( like checkAll() or callAll() ) but I can't figure out how to format them and still include my conditional. Thoughts?