"use strict";var Asset=function(t,e,s,i){this.name=t,this.type=e,this.createdObject=s,this.job=i,this.finished=!1};Asset.prototype.waitWithRunningForFinish=function(t){var e=assetLoader.makeDummyJob("proxy",!1);e.waitForFinish(t),this.waitFor(e)},Asset.prototype.waitFor=function(t,e){if(!Util.isInitialized(e))var e=!1;Util.isInitialized(t)&&(t instanceof Asset?this.job.addRequiredJob(t.job,e):this.job.addRequiredJob(t,e))},Asset.prototype.waitForFinish=function(t){this.waitFor(t,!0)},Asset.prototype.startJob=function(){this.job.start()},Asset.prototype.getCreatedObject=function(){return this.type!==Asset.AssetType.TEXT?this.createdObject:this.job.getDownloadedData()},Asset.prototype.getText=function(){return this.type!==Asset.AssetType.TEXT?null:this.getCreatedObject()},Asset.prototype.isFinished=function(){return this.finished},Asset.prototype.markFinished=function(){this.finished=!0},Asset.AssetType={IMAGE:0,SCENE_DEF:1,TEXT:2,JSON:3,DUMMY:4,DUMMY_START_ITSELF:5};