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

debug(x, y, debugBodies) Uses Game.Debug to draw some useful information about this Weapon, including the number of bulletsboth in-flight, and available. And optionally the physics debug bodies of the bullets. Parameters Name Type Argument Default Description x integer <optional> 16 The coordinate, in screen space, at which to draw the Weapon debug data. y integer <optional> 32 The coordinate, in screen space, at which to draw the Weapon debug data. debugBodies boolean

Weapon#bulletWorldWrapPadding

bulletWorldWrapPadding : integer If bulletWorldWrap is true then you can provide an optional padding value with thisproperty. It's added to the calculations determining when the Bullet should wrap aroundthe world or not. The value is given in pixels. Source code: plugins/weapon/WeaponPlugin.js (Line 144)