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_NEVER
The bullets are never destroyed by the Weapon. It's up to you to destroy them via your own code. -
Phaser.Weapon.KILL_LIFESPAN
The bullets are automatically killed when theirbulletLifespan
amount expires. -
Phaser.Weapon.KILL_DISTANCE
The bullets are automatically killed when they exceedbulletDistance
pixels away from their original launch position. -
Phaser.Weapon.KILL_WEAPON_BOUNDS
The bullets are automatically killed when they no longer intersect with theWeapon.bounds
rectangle. -
Phaser.Weapon.KILL_CAMERA_BOUNDS
The bullets are automatically killed when they no longer intersect with theCamera.bounds
rectangle. -
Phaser.Weapon.KILL_WORLD_BOUNDS
The bullets are automatically killed when they no longer intersect with theWorld.bounds
rectangle. -
Phaser.Weapon.KILL_STATIC_BOUNDS
The bullets are automatically killed when they no longer intersect with theWeapon.bounds
rectangle.
The difference between static bounds and weapon bounds, is that a static bounds will never be adjusted to
match the position of a tracked sprite or pointer.
- Source code: plugins/weapon/WeaponPlugin.js (Line 1136)
Please login to continue.