public AssetLoad addLoad(Asset a) { //if(a.bundle != null || a.isLoaded == true) if ((!(System.Object.ReferenceEquals(a.bundle, null))) || a.isLoaded == true) { Common.DEBUG_MSG("LoadAssetsPool::addLoad:" + a.source + ", bundle != null(" + a.bundle + ") or isLoaded(" + a.isLoaded + ")!"); return(null); } if (findLoad(a.source) != null) { Common.DEBUG_MSG("LoadAssetsPool::addLoad: findLoad(" + a.source + ") = true!"); return(null); } AssetLoad load = null; if (a.type == Asset.TYPE.SKYBOX) { load = new AssetLoadSkybox(loader_, this, a); } else if (a.type == Asset.TYPE.TERRAIN) { load = new AssetLoadTerrain(loader_, this, a); } else if (a.type == Asset.TYPE.TERRAIN_DETAIL_TEXTURE) { load = new AssetLoadTerrain(loader_, this, a); } else if (a.type == Asset.TYPE.TERRAIN_TREE) { load = new AssetLoadTerrain(loader_, this, a); } else if (a.type == Asset.TYPE.WORLD_OBJ) { load = new AssetLoad(loader_, this, a); } else { load = new AssetLoad(loader_, this, a); } add(load); return(load); }
public AssetLoad addLoad(Asset a) { if(a.bundle != null || a.isLoaded == true) { Common.DEBUG_MSG("LoadAssetsPool::addLoad:" + a.source + ", bundle != null(" + a.bundle + ") or isLoaded(" + a.isLoaded + ")!"); return null; } if(findLoad(a.source) != null) { Common.DEBUG_MSG("LoadAssetsPool::addLoad: findLoad("+ a.source + ") = true!"); return null; } AssetLoad load = null; if(a.type == Asset.TYPE.SKYBOX) { load = new AssetLoadSkybox(loader_, this, a); } else if(a.type == Asset.TYPE.TERRAIN) { load = new AssetLoadTerrain(loader_, this, a); } else if(a.type == Asset.TYPE.TERRAIN_DETAIL_TEXTURE) { load = new AssetLoadTerrain(loader_, this, a); } else if(a.type == Asset.TYPE.TERRAIN_TREE) { load = new AssetLoadTerrain(loader_, this, a); } else if(a.type == Asset.TYPE.WORLD_OBJ) { load = new AssetLoad(loader_, this, a); } else { load = new AssetLoad(loader_, this, a); } add(load); return load; }