Skip to content

Commit

Permalink
Merge pull request #2696 from JTronLabs/dev
Browse files Browse the repository at this point in the history
changed return value of Plugin.Weapon's fire, fireAtXY, fireAtPointer…
  • Loading branch information
photonstorm authored Aug 18, 2016
2 parents bfb12d9 + e90619b commit b13fd40
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/plugins/weapon/WeaponPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ Phaser.Weapon.prototype.trackPointer = function (pointer, offsetX, offsetY) {
* @param {Phaser.Sprite|Phaser.Point|Object} [from] - Optionally fires the bullet **from** the `x` and `y` properties of this object. If set this overrides `Weapon.trackedSprite` or `trackedPointer`. Pass `null` to ignore it.
* @param {number} [x] - The x coordinate, in world space, to fire the bullet **towards**. If left as `undefined` the bullet direction is based on its angle.
* @param {number} [y] - The y coordinate, in world space, to fire the bullet **towards**. If left as `undefined` the bullet direction is based on its angle.
* @return {boolean} True if a bullet was successfully fired, otherwise false.
* @return {Phaser.Bullet} The fired bullet if successful, null otherwise.
*/
Phaser.Weapon.prototype.fire = function (from, x, y) {

Expand Down Expand Up @@ -880,7 +880,7 @@ Phaser.Weapon.prototype.fire = function (from, x, y) {
this.onFireLimit.dispatch(this, this.fireLimit);
}
}

return bullet;
};

/**
Expand All @@ -889,7 +889,7 @@ Phaser.Weapon.prototype.fire = function (from, x, y) {
*
* @method Phaser.Weapon#fireAtPointer
* @param {Phaser.Pointer} [pointer] - The Pointer to fire the bullet towards.
* @return {boolean} True if a bullet was successfully fired, otherwise false.
* @return {Phaser.Bullet} The fired bullet if successful, null otherwise.
*/
Phaser.Weapon.prototype.fireAtPointer = function (pointer) {

Expand All @@ -905,7 +905,7 @@ Phaser.Weapon.prototype.fireAtPointer = function (pointer) {
*
* @method Phaser.Weapon#fireAtSprite
* @param {Phaser.Sprite} [sprite] - The Sprite to fire the bullet towards.
* @return {boolean} True if a bullet was successfully fired, otherwise false.
* @return {Phaser.Bullet} The fired bullet if successful, null otherwise.
*/
Phaser.Weapon.prototype.fireAtSprite = function (sprite) {

Expand All @@ -920,7 +920,7 @@ Phaser.Weapon.prototype.fireAtSprite = function (sprite) {
* @method Phaser.Weapon#fireAtXY
* @param {number} [x] - The x coordinate, in world space, to fire the bullet towards.
* @param {number} [y] - The y coordinate, in world space, to fire the bullet towards.
* @return {boolean} True if a bullet was successfully fired, otherwise false.
* @return {Phaser.Bullet} The fired bullet if successful, null otherwise.
*/
Phaser.Weapon.prototype.fireAtXY = function (x, y) {

Expand Down
10 changes: 5 additions & 5 deletions typescript/phaser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ declare module Phaser {
l: number;
color: number;
color32: number;
rgba: string;
rgba: string;
}

class Create {
Expand Down Expand Up @@ -5651,10 +5651,10 @@ declare module Phaser {
createBullets(quantity?: number, key?: any, frame?: any, group?: Phaser.Group): Phaser.Weapon;
debug(x?: number, y?: number, debugBodies?: boolean): void;
destroy(): void;
fire(from?: any, x?: number, y?: number): boolean;
fireAtPointer(pointer: Phaser.Pointer): boolean;
fireAtSprite(sprite: Phaser.Sprite): boolean;
fireAtXY(x: number, y: number): boolean;
fire(from?: any, x?: number, y?: number): Phaser.Bullet;
fireAtPointer(pointer: Phaser.Pointer): Phaser.Bullet;
fireAtSprite(sprite: Phaser.Sprite): Phaser.Bullet;
fireAtXY(x: number, y: number): Phaser.Bullet;
forEach(callback: any, callbackContext: any): Phaser.Weapon;
killAll(): Phaser.Weapon;
pauseAll(): Phaser.Weapon;
Expand Down

0 comments on commit b13fd40

Please sign in to comment.