mirror of
https://github.com/wassname/phaser.git
synced 2026-09-09 11:28:47 +08:00
Preparing for 1.0 branch
This commit is contained in:
@@ -71,9 +71,9 @@ module Phaser {
|
||||
|
||||
if (bodyType !== Phaser.Types.BODY_DISABLED)
|
||||
{
|
||||
this.body = new Phaser.Physics.Body(this, bodyType, 0, 0, shapeType);
|
||||
this.game.physics.addBody(this.body);
|
||||
this.transform.origin.setTo(0.5, 0.5);
|
||||
//this.body = new Phaser.Physics.Body(this, bodyType, 0, 0, shapeType);
|
||||
//this.game.physics.addBody(this.body);
|
||||
//this.transform.origin.setTo(0.5, 0.5);
|
||||
}
|
||||
|
||||
this.worldView = new Rectangle(x, y, this.width, this.height);
|
||||
@@ -88,6 +88,7 @@ module Phaser {
|
||||
this.scale = this.transform.scale;
|
||||
this.alpha = this.texture.alpha;
|
||||
this.origin = this.transform.origin;
|
||||
this.crop = this.texture.crop;
|
||||
|
||||
}
|
||||
|
||||
@@ -255,6 +256,13 @@ module Phaser {
|
||||
*/
|
||||
public scale: Phaser.Vec2;
|
||||
|
||||
/**
|
||||
* The crop rectangle allows you to control which part of the sprite texture is rendered without distorting it.
|
||||
* Set to null to disable, set to a Phaser.Rectangle object to control the region that will be rendered, anything outside the rectangle is ignored.
|
||||
* @type {Phaser.Rectangle}
|
||||
*/
|
||||
public crop: Phaser.Rectangle;
|
||||
|
||||
/**
|
||||
* The origin of the Sprite around which rotation and positioning takes place.
|
||||
* This is a reference to Sprite.transform.origin
|
||||
|
||||
Reference in New Issue
Block a user