You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Phaser.Keyboard.lastKey will return the most recently pressed Key object.
73
73
* RetroFont.updateOffset allows you to modify the offsetX/Y values used by the font during rendering.
74
74
* ArcadePhysics.Body has a new boolean property `enable`. If `false` the body won't be checked for any collision or overlaps, or have its pre or post update methods called. Use this for easy toggling of physics bodies without having to destroy or re-create the Body object itself.
75
+
* BitmapData.addToWorld will create a new Phaser.Image object, assign the BitmapData to be its texture, add it to the world then return it.
76
+
* BitmapData.copyPixels now accepts a Sprite, Image, BitmapData, HTMLImage or string as its source.
* Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.
755
+
*
756
+
* @method Phaser.BitmapData#addToWorld
757
+
* @param {number} [x=0] - The x coordinate to place the image at.
758
+
* @param {number} [y=0] - The y coordinate to place the image at.
759
+
* @return {Phaser.Image} The newly added Image object.
760
+
*/
761
+
addToWorld: function(x,y){
762
+
763
+
returnthis.game.add.image(x,y,this);
764
+
765
+
},
766
+
753
767
/**
754
768
* Copies the pixels from the source image to this BitmapData based on the given area and destination.
755
769
*
756
770
* @method Phaser.BitmapData#copyPixels
757
-
* @param {HTMLImage|string} source - The Image to draw. If you give a key it will try and find the Image in the Game.Cache.
771
+
* @param {Phaser.Sprite|Phaser.Image|Phaser.BitmapData|HTMLImage|string} source - The Image to copy from. If you give a string it will try and find the Image in the Game.Cache.
758
772
* @param {Phaser.Rectangle} area - The Rectangle region to copy from the source image.
759
-
* @param {number} destX - The destination x coordinate to copy the image to.
760
-
* @param {number} destY - The destination y coordinate to copy the image to.
773
+
* @param {number} x - The destination x coordinate to copy the image to.
774
+
* @param {number} y - The destination y coordinate to copy the image to.
0 commit comments