Update boss fight
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { ObjectUtils } from "../../../utilities/object-utils";
|
||||
import { IDrawingItem, MobInfo, TreasureItem } from "../massive-darkness2.model";
|
||||
|
||||
export class MD2Clone {
|
||||
|
||||
public static CloneDrawingItem(obj: IDrawingItem) {
|
||||
let type = obj.constructor.name;
|
||||
let cloneObj = null;
|
||||
switch (type) {
|
||||
case "TreasureItem":
|
||||
return new TreasureItem(obj['type'], 1);
|
||||
break;
|
||||
case "MobInfo":
|
||||
return new MobInfo(obj);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
return ObjectUtils.CloneValue(obj);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user