Closed FlixelCommunityBot closed 10 years ago
Comment by photonstorm from Wednesday Oct 12, 2011 at 10:56 GMT
Bullets now have a protected var called "weapon" which links to the instance of the weapon from which it was fired. This isn't perfect, but should be enough for now. V2.0 of FPT restructures this significantly.
Issue by alextfish from Monday Oct 03, 2011 at 12:05 GMT Originally opened as https://github.com/photonstorm/Flixel-Power-Tools/issues/9
This issue was reported on the Flixel forums. At the moment, in the collision function between a bullet and something else, there's no way to tell what kind of bullet it is; i.e. what weapon it was fired from. The only way to get this is to use a different FlxGroup for each weapon's bullets, and then perform each collision check with each FlxGroup, passing in a different callback function. It'd potentially simplify user code if there was an easy way to retrieve the weapon from a bullet so we can tell what kind of weapon it is.