public CRLuo_PlayAnim_FX Show_LAction(int id_L) { Screen_Brightness_ONOFF(true); if (Man_GameObj_L != null) { Destroy(Man_GameObj_L); } string prefabName = "pb" + id_L; Man_L = null; #if SPLIT_MODEL Object temp_L = ModelLoader.get3DModel(id_L); // Debug.LogError (" temp L ==" + temp_L ); if (temp_L != null) { AssetTask task = new AssetTask(prefabName, typeof(Object), null); task.AppendCommonParam(id_L, temp_L); FeatureLeft(task); } else { // Debug.LogError (" temp L is null == " + Core.Data.sourceManager.IsModelExist(id_L) ); if (Core.Data.sourceManager.IsModelExist(id_L)) { AssetTask aTask = new AssetTask(prefabName, typeof(Object), FeatureLeft); aTask.AppendCommonParam(id_L, null, AssetTask.loadType.Only_loadlocal); //再通过WWW加载 aTask.DispatchToRealHandler(); } else { Object tempDefault = PrefabLoader.loadFromUnPack("CRLuo/pbXXX", false, true); AssetTask task = new AssetTask(prefabName, typeof(Object), null); task.AppendCommonParam(id_L, tempDefault); FeatureLeft(task); } } #else Object temp_L = ModelLoader.get3DModel(id_L); AssetTask task = new AssetTask(prefabName, typeof(Object), null); task.AppendCommonParam(id_L, temp_L); FeatureLeft(task); #endif return(Man_L); }
public void DownloadModel(int index) { //Debug.Log("index : " + index); if (m_SouceDatas.Count > index) { m_CurBundleName = m_SouceDatas [index].FileName; m_IsFrist = true; m_FristTime = Time.time; if (sourceMgr.getSouceExist(m_SouceDatas [index].FileName)) { Debug.Log("FileName : " + m_SouceDatas [index].FileName + " Errr!!!!!!!"); } else { AssetTask aTask = new AssetTask(m_SouceDatas [index].FileName.Replace(".unity3d", ""), typeof(Object), FeatureRight); aTask.AppendCommonParam(m_SouceDatas [index].Num, null, AssetTask.loadType.Only_Download); aTask.reportProgress = functionprogress; aTask.LoadError = loadError; //再通过WWW加载 aTask.DispatchToRealHandler(); } m_SLiderTotal.value = curTotalRatio + (1 - curTotalRatio) * curCount * 1.0f / totalCount; } else { m_BtnState = BtnState.BS_Receive; m_Slider.value = 1; m_SLiderTotal.value = 1; string color1 = "000000"; string color2 = "ffff02"; SetDownloadSizeLabel(SetLabelColor(color2, m_DownEndStr)); SetDownloadLabel(m_DownloadStr); SetDownloadTimeLabel(SetLabelColor(color1, m_DownTimeStr + "0" + m_SecondStr)); if (Core.Data.playerManager.RTData.downloadReawrd != 1) { m_ReceiveBtn.SetActive(true); } else { m_ReceiveBtn.SetActive(false); } } }
public void DownloadModel(int id) { string prefabName = "pb" + id; if (Core.Data.sourceManager.IsModelExist(id)) { Debug.Log("prefabName : " + prefabName + " Error!!!!!!!"); } else { AssetTask aTask = new AssetTask(prefabName, typeof(UObj), LoadFinished); aTask.AppendCommonParam(id, null, AssetTask.loadType.Both_Download_loadlocal); aTask.reportProgress = functionprogress; aTask.LoadError = loadError; //再通过WWW加载 aTask.DispatchToRealHandler(); } }
public void ShowCharactor(int ID, MonsterAttribute attri = MonsterAttribute.DEFAULT_NO, bool allFated = false) { //NewOBJ = true; this.attri = attri; this.mAllFated = allFated; string prefabName = "pb" + ID; #if SPLIT_MODEL Object temp = ModelLoader.get3DModel(ID); if (temp != null) { AssetTask aTask = new AssetTask("pb" + ID, typeof(Object), FeatureShow); aTask.AppendCommonParam(ID, temp); FeatureShow(aTask); } else { if (Core.Data.sourceManager.IsModelExist(ID)) { AssetTask aTask = new AssetTask(prefabName, typeof(Object), FeatureShow); aTask.AppendCommonParam(ID, null, AssetTask.loadType.Only_loadlocal); //再通过WWW加载 aTask.DispatchToRealHandler(); } else { Object tempDefault = PrefabLoader.loadFromUnPack("CRLuo/pbXXX", false, false); AssetTask task = new AssetTask(prefabName, typeof(Object), null); task.AppendCommonParam(ID, tempDefault); FeatureShow(task); } } #else Object temp = ModelLoader.get3DModel(ID); AssetTask aTask = new AssetTask(prefabName, typeof(Object), FeatureShow); aTask.AppendCommonParam(ID, temp); FeatureShow(aTask); #endif }
public void CreateModel() { int id_L = CharactorID; string prefabName = "pb" + id_L; #if SPLIT_MODEL Object temp_L = ModelLoader.get3DModel(id_L); if (temp_L != null) { AssetTask task = new AssetTask(prefabName, typeof(Object), null); task.AppendCommonParam(id_L, temp_L); FeatureLeft(task); } else { if (Core.Data.sourceManager.IsModelExist(id_L)) { AssetTask aTask = new AssetTask(prefabName, typeof(Object), FeatureLeft); aTask.AppendCommonParam(id_L, null, AssetTask.loadType.Only_loadlocal); //再通过WWW加载 aTask.DispatchToRealHandler(); } else { Object tempDefault = PrefabLoader.loadFromUnPack("CRLuo/pbXXX", false, true); AssetTask task = new AssetTask(prefabName, typeof(Object), null); task.AppendCommonParam(id_L, tempDefault); FeatureLeft(task); } } #else Object temp_L = ModelLoader.get3DModel(id_L); AssetTask task = new AssetTask(prefabName, typeof(Object), null); task.AppendCommonParam(id_L, temp_L); FeatureLeft(task); #endif }