Jump to content

Weapon Plug in and P2


MikeW
 Share

Recommended Posts

I got it, 

main like of useful code as part of update loop

if (weapon.bullets.children[j].alive== 1 && (Math.pow(weapon.bullets.children[j].x-walkers.x,2)+Math.pow(weapon.bullets.children[j].y-walkers.y,2))<225)

With the bullet having a radius of 15 pixels. 

 

The thing I did not get is bullet information is in 

weapon.bullets.children

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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