Weapon#createBullets()

createBullets(quantity, key, frame, group) → {Phaser.Weapon} This method performs two actions: First it will check to see if the Weapon.bullets Group exists or not,and if not it creates it, adding it the group given as the 4th argument. Then it will seed the bullet pool with the quantity number of Bullets, using the texture key and frameprovided (if any). If for example you set the quantity to be 10, then this Weapon will only ever be able to have 10 bulletsin-flight simultaneously. If you tr

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)

Weapon#bulletSpeedVariance

bulletSpeedVariance : number This is a variance added to the speed of Bullets when they are fired.If bullets have a bulletSpeed value of 200, and a bulletSpeedVariance of 50then the actual speed of the Bullets will be between 150 and 250 pixels per second. Source code: plugins/weapon/WeaponPlugin.js (Line 177)

Weapon#bulletSpeed

bulletSpeed : number The speed at which the bullets are fired. This value is given in pixels per second, andis used to set the starting velocity of the bullets. Source code: plugins/weapon/WeaponPlugin.js (Line 169)

Weapon#bulletLifespan

bulletLifespan : number If you've set bulletKillType to Phaser.Weapon.KILL_LIFESPAN this controls the amountof lifespan the Bullets have set on launch. The value is given in milliseconds.When a Bullet hits its lifespan limit it will be automatically killed. Source code: plugins/weapon/WeaponPlugin.js (Line 185)

Weapon#bulletRotateToVelocity

bulletRotateToVelocity : boolean Bullets can optionally adjust their rotation in-flight to match their velocity.This can create the effect of a bullet 'pointing' to the path it is following, for examplean arrow being fired from a bow, and works especially well when added to bulletGravity. Source code: plugins/weapon/WeaponPlugin.js (Line 207)

Weapon#bullets

bullets : Phaser.Group This is the Phaser.Group that contains all of the bullets managed by this plugin. Source code: plugins/weapon/WeaponPlugin.js (Line 39)

Weapon#bulletKillDistance

bulletKillDistance : number If you've set bulletKillType to Phaser.Weapon.KILL_DISTANCE this controls the distancethe Bullet can travel before it is automatically killed. The distance is given in pixels. Source code: plugins/weapon/WeaponPlugin.js (Line 192)

Weapon#bulletKillType

bulletKillType : integer This controls how the bullets will be killed. The default is Phaser.Weapon.KILL_WORLD_BOUNDS. There are 7 different "kill types" available: Phaser.Weapon.KILL_NEVERThe bullets are never destroyed by the Weapon. It's up to you to destroy them via your own code. Phaser.Weapon.KILL_LIFESPANThe bullets are automatically killed when their bulletLifespan amount expires. Phaser.Weapon.KILL_DISTANCEThe bullets are automatically killed when they exceed bulletDistance pixe

Weapon#bulletKey

bulletKey : string The Texture Key that the Bullets use when rendering.Changing this has no effect on bullets in-flight, only on newly spawned bullets. Source code: plugins/weapon/WeaponPlugin.js (Line 214)