Weapon#resumeAll()

resumeAll() → {Phaser.Weapon} Sets Body.enable to true on each bullet in this Weapon.This has the effect of resuming their motion should they be in-flight.It also enables them for collision checks again. Returns Phaser.Weapon - This Weapon instance. Source code: plugins/weapon/WeaponPlugin.js (Line 525)

Weapon#resetShots()

resetShots(newLimit) → {Phaser.Weapon} Resets the Weapon.shots counter back to zero. This is used when you've setWeapon.fireLimit, and have hit (or just wish to reset) your limit. Parameters Name Type Argument Description newLimit integer <optional> Optionally set a new Weapon.fireLimit. Returns Phaser.Weapon - This Weapon instance. Source code: plugins/weapon/WeaponPlugin.js (Line 558)

Weapon#pauseAll()

pauseAll() → {Phaser.Weapon} Sets Body.enable to false on each bullet in this Weapon.This has the effect of stopping them in-flight should they be moving.It also stops them being able to be checked for collision. Returns Phaser.Weapon - This Weapon instance. Source code: plugins/weapon/WeaponPlugin.js (Line 509)

Weapon#onKill

onKill : Phaser.Signal The onKill Signal is dispatched each time a Bullet that is in-flight is killed. This can be the resultof leaving the Weapon bounds, an expiring lifespan, or exceeding a specified distance.The callback is sent one argument: A reference to the bullet sprite itself. Source code: plugins/weapon/WeaponPlugin.js (Line 315)

Weapon#onFireLimit

onFireLimit : Phaser.Signal The onFireLimit Signal is dispatched if Weapon.fireLimit is > 0, and a bullet launch takes the numberof shots fired to equal the fire limit.The callback is sent two arguments: A reference to the Weapon that hit the limit, and the value ofWeapon.fireLimit. Source code: plugins/weapon/WeaponPlugin.js (Line 325)

Weapon#onFire

onFire : Phaser.Signal The onFire Signal is dispatched each time Weapon.fire is called, and a Bullet issuccessfully launched. The callback is set two arguments: a reference to the bullet sprite itself,and a reference to the Weapon that fired the bullet. Source code: plugins/weapon/WeaponPlugin.js (Line 306)

Weapon#killAll()

killAll() → {Phaser.Weapon} Calls Bullet.kill on every in-flight bullet in this Weapon.Also re-enables their physics bodies, should they have been disabled via pauseAll. Returns Phaser.Weapon - This Weapon instance. Source code: plugins/weapon/WeaponPlugin.js (Line 541)

Weapon#forEach()

forEach(callback, callbackContext, args) → {Phaser.Weapon} Call a function on each in-flight bullet in this Weapon. See forEachExists for more details. Parameters Name Type Argument Default Description callback function The function that will be called for each applicable child. The child will be passed as the first argument. callbackContext object The context in which the function should be called (usually 'this'). args any <optional> <repeatable> (none) Additio

Weapon#fireRateVariance

fireRateVariance : number This is a modifier that is added to the fireRate each update to add varietyto the firing rate of the Weapon. The value is given in milliseconds.If you've a fireRate of 200 and a fireRateVariance of 50 then the actualfiring rate of the Weapon will be between 150 and 250. Source code: plugins/weapon/WeaponPlugin.js (Line 84)

Weapon#fireRate

fireRate : number The rate at which this Weapon can fire. The value is given in milliseconds. Source code: plugins/weapon/WeaponPlugin.js (Line 75)