Hacky fix to state cloning

This commit is contained in:
Tangent Wantwight 2020-03-26 00:29:51 -04:00
parent 281514e7b7
commit 07071e6ca6
1 changed files with 2 additions and 2 deletions

View File

@ -77,8 +77,8 @@ export class Data extends CoreData {
constructor(source?: Partial<Data>) {
super(source);
if(source?.location) this.location = source.location.slice();
if(source?.bounds) this.bounds = source.bounds.slice();
if(source?.location) this.location = source.location.map(b => ({...b}));
if(source?.bounds) this.bounds = source.bounds.map(b => ({...b}));
if(source?.renderBounds) this.renderBounds = copy(source.renderBounds);
if(source?.renderSprite) this.renderSprite = copy(source.renderSprite);
if(source?.collisionSourceClass) this.collisionSourceClass = copy(source.collisionSourceClass);