修复默认origin没有赋值正确问题
This commit is contained in:
@@ -124,8 +124,10 @@ module es {
|
||||
public render(camera: Camera) {
|
||||
this.sync(camera);
|
||||
|
||||
if (this.displayObject.x != this.bounds.x - camera.bounds.x + this._origin.x) this.displayObject.x = this.bounds.x - camera.bounds.x + this._origin.x;
|
||||
if (this.displayObject.y != this.bounds.y - camera.bounds.y + this._origin.y) this.displayObject.y = this.bounds.y - camera.bounds.y + this._origin.y;
|
||||
if (this.displayObject.x != this.bounds.x - camera.bounds.x + this._origin.x) this.displayObject.x = this.bounds.x - camera.bounds.x + this._origin.x * this.entity.scale.x;
|
||||
if (this.displayObject.y != this.bounds.y - camera.bounds.y + this._origin.y) this.displayObject.y = this.bounds.y - camera.bounds.y + this._origin.y * this.entity.scale.y;
|
||||
if (this.displayObject.anchorOffsetX != this._origin.x) this.displayObject.anchorOffsetX = this._origin.x;
|
||||
if (this.displayObject.anchorOffsetY != this._origin.y) this.displayObject.anchorOffsetY = this._origin.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user