public void BuildActionTrigger(ref ActorPreloadTab loadInfo) { AreaEventTrigger[] triggerArray = UnityEngine.Object.FindObjectsOfType <AreaEventTrigger>(); if ((triggerArray != null) && (triggerArray.Length > 0)) { for (int i = 0; i < triggerArray.Length; i++) { AreaEventTrigger trigger = triggerArray[i]; for (int j = 0; j < trigger.TriggerActions.Length; j++) { TriggerActionWrapper triggerActionWrapper = trigger.TriggerActions[j]; if ((triggerActionWrapper != null) && (triggerActionWrapper.TimingActionsInter != null)) { for (int k = 0; k < triggerActionWrapper.TimingActionsInter.Length; k++) { if (!string.IsNullOrEmpty(triggerActionWrapper.TimingActionsInter[k].ActionName) && !this.ageCheckerSet.ContainsKey(triggerActionWrapper.TimingActionsInter[k].ActionName)) { AssetLoadBase item = new AssetLoadBase { assetPath = triggerActionWrapper.TimingActionsInter[k].ActionName }; loadInfo.ageActions.Add(item); this.ageCheckerSet.Add(triggerActionWrapper.TimingActionsInter[k].ActionName, true); } } } if ((triggerActionWrapper != null) && (triggerActionWrapper.TriggerType == EGlobalTriggerAct.TriggerShenFu)) { Singleton <ShenFuSystem> .instance.PreLoadResource(triggerActionWrapper, ref loadInfo, this); } } if ((trigger.PresetActWrapper != null) && (trigger.PresetActWrapper.TimingActionsInter != null)) { for (int m = 0; m < trigger.PresetActWrapper.TimingActionsInter.Length; m++) { if (!string.IsNullOrEmpty(trigger.PresetActWrapper.TimingActionsInter[m].ActionName) && !this.ageCheckerSet.ContainsKey(trigger.PresetActWrapper.TimingActionsInter[m].ActionName)) { AssetLoadBase base3 = new AssetLoadBase { assetPath = trigger.PresetActWrapper.TimingActionsInter[m].ActionName }; loadInfo.ageActions.Add(base3); this.ageCheckerSet.Add(trigger.PresetActWrapper.TimingActionsInter[m].ActionName, true); } } } } } GlobalTrigger[] triggerArray2 = UnityEngine.Object.FindObjectsOfType <GlobalTrigger>(); if ((triggerArray2 != null) && (triggerArray2.Length > 0)) { for (int n = 0; n < triggerArray2.Length; n++) { GlobalTrigger trigger2 = triggerArray2[n]; if ((trigger2.TriggerMatches != null) && (trigger2.TriggerMatches.Length > 0)) { for (int num6 = 0; num6 < trigger2.TriggerMatches.Length; num6++) { CTriggerMatch match = trigger2.TriggerMatches[num6]; if (((match != null) && (match.ActionList != null)) && (match.ActionList.Length > 0)) { for (int num7 = 0; num7 < match.ActionList.Length; num7++) { TriggerActionWrapper wrapper2 = match.ActionList[num7]; if ((wrapper2 != null) && (wrapper2.TimingActionsInter != null)) { for (int num8 = 0; num8 < wrapper2.TimingActionsInter.Length; num8++) { if (!string.IsNullOrEmpty(wrapper2.TimingActionsInter[num8].ActionName) && !this.ageCheckerSet.ContainsKey(wrapper2.TimingActionsInter[num8].ActionName)) { AssetLoadBase base4 = new AssetLoadBase { assetPath = wrapper2.TimingActionsInter[num8].ActionName }; loadInfo.ageActions.Add(base4); this.ageCheckerSet.Add(wrapper2.TimingActionsInter[num8].ActionName, true); } } } } } } } if ((trigger2.ActionList != null) && (trigger2.ActionList.Length > 0)) { for (int num9 = 0; num9 < trigger2.ActionList.Length; num9++) { TriggerActionWrapper wrapper3 = trigger2.ActionList[num9]; if ((wrapper3 != null) && (wrapper3.TimingActionsInter != null)) { for (int num10 = 0; num10 < wrapper3.TimingActionsInter.Length; num10++) { if (!string.IsNullOrEmpty(wrapper3.TimingActionsInter[num10].ActionName) && !this.ageCheckerSet.ContainsKey(wrapper3.TimingActionsInter[num10].ActionName)) { AssetLoadBase base5 = new AssetLoadBase { assetPath = wrapper3.TimingActionsInter[num10].ActionName }; loadInfo.ageActions.Add(base5); this.ageCheckerSet.Add(wrapper3.TimingActionsInter[num10].ActionName, true); } } } } } } } }
public void BuildActionTrigger(ref ActorPreloadTab loadInfo) { AreaEventTrigger[] array = Object.FindObjectsOfType <AreaEventTrigger>(); if (array != null && array.Length > 0) { for (int i = 0; i < array.Length; i++) { AreaEventTrigger areaEventTrigger = array[i]; for (int j = 0; j < areaEventTrigger.TriggerActions.Length; j++) { TriggerActionWrapper triggerActionWrapper = areaEventTrigger.TriggerActions[j]; if (triggerActionWrapper != null) { triggerActionWrapper.PreLoadResource(ref loadInfo, this.ageCheckerSet, this); } if (triggerActionWrapper != null && triggerActionWrapper.TriggerType == EGlobalTriggerAct.TriggerShenFu) { Singleton <ShenFuSystem> .instance.PreLoadResource(triggerActionWrapper, ref loadInfo, this); } } if (areaEventTrigger.PresetActWrapper != null) { areaEventTrigger.PresetActWrapper.PreLoadResource(ref loadInfo, this.ageCheckerSet, this); } } } GlobalTrigger[] array2 = Object.FindObjectsOfType <GlobalTrigger>(); if (array2 != null && array2.Length > 0) { for (int k = 0; k < array2.Length; k++) { GlobalTrigger globalTrigger = array2[k]; if (globalTrigger.TriggerMatches != null && globalTrigger.TriggerMatches.Length > 0) { for (int l = 0; l < globalTrigger.TriggerMatches.Length; l++) { CTriggerMatch cTriggerMatch = globalTrigger.TriggerMatches[l]; if (cTriggerMatch != null && cTriggerMatch.ActionList != null && cTriggerMatch.ActionList.Length > 0) { for (int m = 0; m < cTriggerMatch.ActionList.Length; m++) { TriggerActionWrapper triggerActionWrapper2 = cTriggerMatch.ActionList[m]; if (triggerActionWrapper2 != null) { triggerActionWrapper2.PreLoadResource(ref loadInfo, this.ageCheckerSet, this); } } } } } if (globalTrigger.ActionList != null && globalTrigger.ActionList.Length > 0) { for (int n = 0; n < globalTrigger.ActionList.Length; n++) { TriggerActionWrapper triggerActionWrapper3 = globalTrigger.ActionList[n]; if (triggerActionWrapper3 != null) { triggerActionWrapper3.PreLoadResource(ref loadInfo, this.ageCheckerSet, this); } } } } } }