uzet1

Members
  • Content Count

    1
  • Joined

  • Last visited

  1. Hi, I have a group of items that their y position in increased by 1 during update I want to remove every item the its y is bigger than 600. I'm using kill() enemiesGroup.forEach(function(item){ item.position.y+=1; if(item.position.y>500){ item.kill(); } },this); but this only kill the item's spot but the group has the same length. As the group size is increased every x seconds, the size of the group will get really big over time How can I kill/remove the item and keep the size of the group to the real number of items? TNX