mirror of
https://github.com/wassname/phaser.git
synced 2026-07-16 01:20:13 +08:00
Mouse callback tests.
This commit is contained in:
@@ -77,24 +77,6 @@ Phaser.GameObjectFactory.prototype = {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* DEPRECATED - will be removed in Phaser 1.2
|
||||
* Create a new Sprite with specific position and sprite sheet key that will automatically be added as a child of the given parent.
|
||||
*
|
||||
* @method Phaser.GameObjectFactory#child
|
||||
* @param {Phaser.Group} group - The Group to add this child to.
|
||||
* @param {number} x - X position of the new sprite.
|
||||
* @param {number} y - Y position of the new sprite.
|
||||
* @param {string|RenderTexture} [key] - The image key as defined in the Game.Cache to use as the texture for this sprite OR a RenderTexture.
|
||||
* @param {string|number} [frame] - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name.
|
||||
* @returns {Phaser.Sprite} the newly created sprite object.
|
||||
*/
|
||||
child: function (group, x, y, key, frame) {
|
||||
|
||||
return group.create(x, y, key, frame);
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.
|
||||
*
|
||||
@@ -299,7 +281,7 @@ Phaser.GameObjectFactory.prototype = {
|
||||
if (typeof addToCache === 'undefined') { addToCache = false; }
|
||||
if (typeof key === 'undefined' || key === '') { key = this.game.rnd.uuid(); }
|
||||
|
||||
var texture = new Phaser.RenderTexture(this.game, key, width, height);
|
||||
var texture = new Phaser.RenderTexture(this.game, width, height, key);
|
||||
|
||||
if (addToCache)
|
||||
{
|
||||
|
||||
@@ -402,7 +402,7 @@ Phaser.Image.prototype.bringToTop = function(child) {
|
||||
/**
|
||||
* Indicates the rotation of the Sprite, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
|
||||
* Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.
|
||||
* If you wish to work in radians instead of degrees use the property Sprite.rotation instead. Working in radians is also faster on mobile devices where Object.defineProperty is expensive to call.
|
||||
* If you wish to work in radians instead of degrees use the property Sprite.rotation instead. Working in radians is also a little faster as it doesn't have to convert the angle.
|
||||
*
|
||||
* @name Phaser.Image#angle
|
||||
* @property {number} angle - The angle of this Image in degrees.
|
||||
@@ -509,10 +509,8 @@ Object.defineProperty(Phaser.Image.prototype, "inCamera", {
|
||||
});
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @name Phaser.Image#frame
|
||||
* @property {boolean} frame - .
|
||||
* @property {number} frame - Gets or sets the current frame index and updates the Texture for display.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Image.prototype, "frame", {
|
||||
|
||||
@@ -540,10 +538,8 @@ Object.defineProperty(Phaser.Image.prototype, "frame", {
|
||||
});
|
||||
|
||||
/**
|
||||
* .
|
||||
*
|
||||
* @name Phaser.Image#frameName
|
||||
* @property {boolean} frameName - .
|
||||
* @property {string} frameName - Gets or sets the current frame by name and updates the Texture for display.
|
||||
*/
|
||||
Object.defineProperty(Phaser.Image.prototype, "frameName", {
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
* @param {number} [width=100] - The width of the render texture.
|
||||
* @param {number} [height=100] - The height of the render texture.
|
||||
*/
|
||||
Phaser.RenderTexture = function (game, key, width, height) {
|
||||
Phaser.RenderTexture = function (game, width, height, key) {
|
||||
|
||||
/**
|
||||
* @property {Phaser.Game} game - A reference to the currently running game.
|
||||
@@ -30,7 +30,7 @@ Phaser.RenderTexture = function (game, key, width, height) {
|
||||
*/
|
||||
this.type = Phaser.RENDERTEXTURE;
|
||||
|
||||
PIXI.RenderTexture.call(this, width, height, renderer);
|
||||
PIXI.RenderTexture.call(this, width, height);
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user