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)

Weapon#fireLimit

fireLimit : number The maximum number of shots that this Weapon is allowed to fire before it stops.When the limit is his the Weapon.onFireLimit Signal is dispatched.You can reset the shot counter via Weapon.resetShots. Source code: plugins/weapon/WeaponPlugin.js (Line 69)

Weapon#fireFrom

fireFrom : Phaser.Rectangle This is a Rectangle from within which the bullets are fired. By default it's a 1x1rectangle, the equivalent of a Point. But you can change the width and height, and iflarger than 1x1 it'll pick a random point within the rectangle to launch the bullet from. Source code: plugins/weapon/WeaponPlugin.js (Line 92)