public void OnLoaded(string url, Object obj, LOADSTATUS result, object extra) { if (obj != null) { curActorObj = Instantiate(obj as GameObject) as GameObject; MainPageActorEffectComp comp = curActorObj.GetComponent <MainPageActorEffectComp>(); if (comp != null) { if (comp.effectIds != null) { actorEffectList.AddRange(comp.effectIds); string effPath = null; //for (int j = 0; j < actorEffectList.Count; ++j ) if (actorEffectList.Count > curEffectResIndex) { effPath = string.Format("Effect/{0}", actorEffectList[curEffectResIndex]); KHResource.LoadRes(effPath, OnEffectLoadedCallback); } } } //var aInfo1 = KHDataManager.CONFIG.NinjaDatas[actorId]; UpdateActorPrefabSet(actorId, curActorCfg, CharacterPos); } }
private void ResetActorEffects() { if (curActorObj != null) { MainPageActorEffectComp comp = curActorObj.GetComponent <MainPageActorEffectComp>(); if (comp != null) { comp.Reset(); } } for (int i = 0; i < actorEffectList.Count; ++i) { KHResource.unLoadRes(string.Format("Effect/{0}", actorEffectList[i]), OnEffectLoadedCallback); } actorEffectList.Clear(); curEffectResIndex = 0; }