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
* Crop allows you to crop the texture used to display this Sprite.
533
533
* This modifies the core Sprite texture frame, so the Sprite width/height properties will adjust accordingly.
534
-
*
534
+
*
535
535
* Cropping takes place from the top-left of the Sprite and can be modified in real-time by either providing an updated rectangle object to Sprite.crop,
536
536
* or by modifying Sprite.cropRect (or a reference to it) and then calling Sprite.updateCrop.
537
-
*
537
+
*
538
538
* The rectangle object given to this method can be either a Phaser.Rectangle or any object so long as it has public x, y, width and height properties.
539
539
* A reference to the rectangle is stored in Sprite.cropRect unless the `copy` parameter is `true` in which case the values are duplicated to a local object.
* Checks to see if the bounds of this Sprite overlaps with the bounds of the given Display Object, which can be a Sprite, Image, TileSprite or anything that extends those such as a Button.
810
810
* This check ignores the Sprites hitArea property and runs a Sprite.getBounds comparison on both objects to determine the result.
811
811
* Therefore it's relatively expensive to use in large quantities (i.e. with lots of Sprites at a high frequency), but should be fine for low-volume testing where physics isn't required.
812
-
*
812
+
*
813
813
* @method Phaser.Sprite#overlap
814
814
* @memberof Phaser.Sprite
815
815
* @param {Phaser.Sprite|Phaser.Image|Phaser.TileSprite|Phaser.Button|PIXI.DisplayObject} displayObject - The display object to check against.
0 commit comments