actually, i made it by this way, it works fine… but i’ve looked for methods you said so much… but it is so late now if my method makes any problem soon, i’m gonna use methods you said.
so thats what i made
in BULLET override
if (!removedx){
for (var i:Number = 0; i < 20; i++)
{
if (!removedx){
moveBy(Math.cos(targetangle * FP.RAD) * firespeed / 20 * FP.elapsed, Math.sin(targetangle * FP.RAD) * firespeed / 20 * FP.elapsed);
world.getInstance("playerx").checkCollisions();
}
}
firespeed = firespeed * 0.99;
}
and in PlayerX entity (i’m using player to check global collisions)
public function checkCollisions():void
{
elist.length = 0;
pblist.length = 0;
world.getType("enemy", elist);
world.getType("pbullet", pblist);
for each (var e:Enemy in elist)
{
if (!e.removedx){
for each (var pb:pBullet in pblist)
{
if (!pb.removedx){
//BULLET DESTROY
if (pb.collideWith(e,pb.x,pb.y))
{
pb.hit.play();
var hitanim:Entity = world.add(new HitAnim());
hitanim.x = pb.x;
hitanim.y = pb.y;
pb.removedx = true;
world.remove(pb);
//ENEMY TAKE DAMAGE
e.armor -= bulletdamage;
e.graphicfx.tinting = 0.5;
e.fxtimer = 3;
if (e.armor <= 0) {
world.remove(e);
e.removedx = true;
}
}
}
}
}
}
}
That works so good on a low netbook hardware if enemy+bullet count no more than 50-60