Jump to content

Set bullet property


Amberalex
 Share

Recommended Posts

Hello.

I am using weapon.fire() function and I want to set special property for bullet, that apear after calling this function. 

I tried to use forEach:

weapon.bullets.forEach(function(bullet){
 if(bullet.target == undefined){
  bullet.taget = 'prop1';
  return;
 }
});
weapon.fire();

but this does not work.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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