示例#1
0
 public void BuildActionHelper(ref ActorPreloadTab loadInfo)
 {
     ActionHelper[] helperArray = UnityEngine.Object.FindObjectsOfType <ActionHelper>();
     if ((helperArray != null) && (helperArray.Length != 0))
     {
         for (int i = 0; i < helperArray.Length; i++)
         {
             ActionHelper helper = helperArray[i];
             for (int j = 0; j < helper.actionHelpers.Length; j++)
             {
                 ActionHelperStorage storage      = helper.actionHelpers[j];
                 object[]            inParameters = new object[] { ((storage == null) || (storage.helperName == null)) ? "null" : storage.helperName, ((storage == null) || (storage.actionName == null)) ? "null" : storage.actionName };
                 DebugHelper.Assert((storage != null) && (storage.actionName != null), "storage is null or action name is null. storage = {0}, storage.actionName={1}", inParameters);
                 if (((storage != null) && !string.IsNullOrEmpty(storage.actionName)) && !this.ageCheckerSet.ContainsKey(storage.actionName))
                 {
                     AssetLoadBase item = new AssetLoadBase {
                         assetPath = storage.actionName
                     };
                     loadInfo.ageActions.Add(item);
                     this.ageCheckerSet.Add(storage.actionName, true);
                 }
             }
         }
     }
 }
示例#2
0
 public void BuildActionHelper(ref ActorPreloadTab loadInfo)
 {
     ActionHelper[] array = Object.FindObjectsOfType <ActionHelper>();
     if (array == null || array.Length == 0)
     {
         return;
     }
     for (int i = 0; i < array.Length; i++)
     {
         ActionHelper actionHelper = array[i];
         for (int j = 0; j < actionHelper.actionHelpers.Length; j++)
         {
             ActionHelperStorage actionHelperStorage = actionHelper.actionHelpers[j];
             DebugHelper.Assert(actionHelperStorage != null && actionHelperStorage.actionName != null, "storage is null or action name is null. storage = {0}, storage.actionName={1}", new object[]
             {
                 (actionHelperStorage != null && actionHelperStorage.helperName != null) ? actionHelperStorage.helperName : "null",
                 (actionHelperStorage != null && actionHelperStorage.actionName != null) ? actionHelperStorage.actionName : "null"
             });
             if (actionHelperStorage != null && !string.IsNullOrEmpty(actionHelperStorage.actionName) && !this.ageCheckerSet.ContainsKey(actionHelperStorage.actionName))
             {
                 AssetLoadBase assetLoadBase = default(AssetLoadBase);
                 assetLoadBase.assetPath = actionHelperStorage.actionName;
                 loadInfo.ageActions.Add(assetLoadBase);
                 this.ageCheckerSet.Add(actionHelperStorage.actionName, true);
             }
         }
     }
 }
示例#3
0
 private void AddActionsFromActionHelper(DictionaryView <string, AGE.Action> actions)
 {
     ActionHelper[] helperArray = UnityEngine.Object.FindObjectsOfType <ActionHelper>();
     if ((helperArray != null) && (helperArray.Length != 0))
     {
         for (int i = 0; i < helperArray.Length; i++)
         {
             ActionHelper helper = helperArray[i];
             for (int j = 0; j < helper.actionHelpers.Length; j++)
             {
                 ActionHelperStorage storage = helper.actionHelpers[j];
                 this.AddAction(actions, storage.actionName);
             }
         }
     }
 }
示例#4
0
 private void AddActionsFromActionHelper(DictionaryView <string, Action> actions)
 {
     ActionHelper[] array = Object.FindObjectsOfType <ActionHelper>();
     if (array == null || array.Length == 0)
     {
         return;
     }
     for (int i = 0; i < array.Length; i++)
     {
         ActionHelper actionHelper = array[i];
         for (int j = 0; j < actionHelper.actionHelpers.Length; j++)
         {
             ActionHelperStorage actionHelperStorage = actionHelper.actionHelpers[j];
             this.AddAction(actions, actionHelperStorage.actionName);
         }
     }
 }