Hacky fix to state cloning
This commit is contained in:
parent
281514e7b7
commit
07071e6ca6
1 changed files with 2 additions and 2 deletions
|
@ -77,8 +77,8 @@ export class Data extends CoreData {
|
||||||
|
|
||||||
constructor(source?: Partial<Data>) {
|
constructor(source?: Partial<Data>) {
|
||||||
super(source);
|
super(source);
|
||||||
if(source?.location) this.location = source.location.slice();
|
if(source?.location) this.location = source.location.map(b => ({...b}));
|
||||||
if(source?.bounds) this.bounds = source.bounds.slice();
|
if(source?.bounds) this.bounds = source.bounds.map(b => ({...b}));
|
||||||
if(source?.renderBounds) this.renderBounds = copy(source.renderBounds);
|
if(source?.renderBounds) this.renderBounds = copy(source.renderBounds);
|
||||||
if(source?.renderSprite) this.renderSprite = copy(source.renderSprite);
|
if(source?.renderSprite) this.renderSprite = copy(source.renderSprite);
|
||||||
if(source?.collisionSourceClass) this.collisionSourceClass = copy(source.collisionSourceClass);
|
if(source?.collisionSourceClass) this.collisionSourceClass = copy(source.collisionSourceClass);
|
||||||
|
|
Loading…
Reference in a new issue