Commit bf9a7460 authored by rockyl's avatar rockyl

修复

parent 30c83217
...@@ -450,6 +450,9 @@ export class DisplayObject extends EventDispatcher { ...@@ -450,6 +450,9 @@ export class DisplayObject extends EventDispatcher {
} }
set x(value: number) { set x(value: number) {
if(this.destroyed){
return;
}
this.transform.position.x = value; this.transform.position.x = value;
} }
...@@ -458,6 +461,9 @@ export class DisplayObject extends EventDispatcher { ...@@ -458,6 +461,9 @@ export class DisplayObject extends EventDispatcher {
} }
set y(value: number) { set y(value: number) {
if(this.destroyed){
return;
}
this.transform.position.y = value; this.transform.position.y = value;
} }
...@@ -493,6 +499,9 @@ export class DisplayObject extends EventDispatcher { ...@@ -493,6 +499,9 @@ export class DisplayObject extends EventDispatcher {
* 设置位置对象 * 设置位置对象
*/ */
set position(value) { set position(value) {
if(this.destroyed){
return;
}
this.transform.position.copy(value); this.transform.position.copy(value);
} }
...@@ -508,6 +517,9 @@ export class DisplayObject extends EventDispatcher { ...@@ -508,6 +517,9 @@ export class DisplayObject extends EventDispatcher {
* 设置缩放对象 * 设置缩放对象
*/ */
set scale(value) { set scale(value) {
if(this.destroyed){
return;
}
this.transform.scale.copy(value); this.transform.scale.copy(value);
} }
...@@ -516,6 +528,9 @@ export class DisplayObject extends EventDispatcher { ...@@ -516,6 +528,9 @@ export class DisplayObject extends EventDispatcher {
} }
set scaleX(value) { set scaleX(value) {
if(this.destroyed){
return;
}
this.transform.scale.x = value; this.transform.scale.x = value;
} }
...@@ -524,6 +539,9 @@ export class DisplayObject extends EventDispatcher { ...@@ -524,6 +539,9 @@ export class DisplayObject extends EventDispatcher {
} }
set scaleY(value) { set scaleY(value) {
if(this.destroyed){
return;
}
this.transform.scale.y = value; this.transform.scale.y = value;
} }
...@@ -536,6 +554,9 @@ export class DisplayObject extends EventDispatcher { ...@@ -536,6 +554,9 @@ export class DisplayObject extends EventDispatcher {
} }
set anchor(value) { set anchor(value) {
if(this.destroyed){
return;
}
this.transform.anchor.copy(value); this.transform.anchor.copy(value);
} }
...@@ -544,6 +565,9 @@ export class DisplayObject extends EventDispatcher { ...@@ -544,6 +565,9 @@ export class DisplayObject extends EventDispatcher {
} }
set anchorX(value) { set anchorX(value) {
if(this.destroyed){
return;
}
this.transform.anchor.x = value; this.transform.anchor.x = value;
} }
...@@ -552,6 +576,9 @@ export class DisplayObject extends EventDispatcher { ...@@ -552,6 +576,9 @@ export class DisplayObject extends EventDispatcher {
} }
set anchorY(value) { set anchorY(value) {
if(this.destroyed){
return;
}
this.transform.anchor.y = value; this.transform.anchor.y = value;
} }
...@@ -564,6 +591,9 @@ export class DisplayObject extends EventDispatcher { ...@@ -564,6 +591,9 @@ export class DisplayObject extends EventDispatcher {
} }
set skew(value) { set skew(value) {
if(this.destroyed){
return;
}
this.transform.skew.copy(value); this.transform.skew.copy(value);
} }
...@@ -579,6 +609,9 @@ export class DisplayObject extends EventDispatcher { ...@@ -579,6 +609,9 @@ export class DisplayObject extends EventDispatcher {
* 角度制 * 角度制
*/ */
set rotation(value: number) { set rotation(value: number) {
if(this.destroyed){
return;
}
this.transform.rotation = value * DEG_TO_RAD; this.transform.rotation = value * DEG_TO_RAD;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment