Weapon#destroy()

destroy() Destroys this Weapon. It removes itself from the PluginManager, destroysthe bullets Group, and nulls internal references. Source code: plugins/weapon/WeaponPlugin.js (Line 579)

Weapon#fire()

fire(from, x, y) → {Phaser.Bullet} Attempts to fire a single Bullet. If there are no more bullets available in the pool, and the pool cannot be extended,then this method returns false. It will also return false if not enough time has expired since the last timethe Weapon was fired, as defined in the Weapon.fireRate property. Otherwise the first available bullet is selected and launched. The arguments are all optional, but allow you to control both where the bullet is launched from, and aimed

Weapon#fireAngle

fireAngle : integer The angle at which the bullets are fired. This can be a const such as Phaser.ANGLE_UPor it can be any number from 0 to 360 inclusive, where 0 degrees is to the right. Source code: plugins/weapon/WeaponPlugin.js (Line 99)

Weapon#fireAtPointer()

fireAtPointer(pointer) → {Phaser.Bullet} Fires a bullet at the given Pointer. The bullet will be launched from the Weapon.fireFrom position,or from a Tracked Sprite or Pointer, if you have one set. Parameters Name Type Argument Description pointer Phaser.Pointer <optional> The Pointer to fire the bullet towards. Returns Phaser.Bullet - The fired bullet if successful, null otherwise. Source code: plugins/weapon/WeaponPlugin.js (Line 928)

Weapon#fireAtSprite()

fireAtSprite(sprite) → {Phaser.Bullet} Fires a bullet at the given Sprite. The bullet will be launched from the Weapon.fireFrom position,or from a Tracked Sprite or Pointer, if you have one set. Parameters Name Type Argument Description sprite Phaser.Sprite <optional> The Sprite to fire the bullet towards. Returns Phaser.Bullet - The fired bullet if successful, null otherwise. Source code: plugins/weapon/WeaponPlugin.js (Line 944)

Weapon#fireAtXY()

fireAtXY(x, y) → {Phaser.Bullet} Fires a bullet at the given coordinates. The bullet will be launched from the Weapon.fireFrom position,or from a Tracked Sprite or Pointer, if you have one set. Parameters Name Type Argument Description x number <optional> The x coordinate, in world space, to fire the bullet towards. y number <optional> The y coordinate, in world space, to fire the bullet towards. Returns Phaser.Bullet - The fired bullet if successful, null otherwise.

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)

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#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#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)