Bullet#Bullet

new Bullet(game, x, y, key, frame)

Create a new Bullet object. Bullets are used by the Phaser.Weapon class, and are normal Sprites,
with a few extra properties in the data object to handle Weapon specific features.

Parameters
Name Type Description
game Phaser.Game

A reference to the currently running game.

x number

The x coordinate (in world space) to position the Particle at.

y number

The y coordinate (in world space) to position the Particle at.

key string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture

This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture.

frame string | number

If this Particle is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index.

Source code: plugins/weapon/Bullet.js (Line 20)
doc_phaser
2017-02-14 10:38:06
Comments
Leave a Comment

Please login to continue.