示例#1
0
 public static bool Execute(ST_TaskSceneData sceneData, Action callback, out ITaskExecutor executor)
 {
     executor = TaskFactoy.CreateTaskExecutorByTypeName(sceneData.strExecutorTypyName);
     if (executor == null)
     {
         callback?.Invoke();
         return(false);
     }
     executor.Executor(sceneData, callback);
     return(true);
 }
示例#2
0
        public static ITaskExecutor Execute(ST_TaskSceneData sceneData, Action callback)
        {
            ITaskExecutor executor = TaskFactoy.CreateTaskExecutorByTypeName(sceneData.strExecutorTypyName);

            if (executor == null)
            {
                callback?.Invoke();
                return(null);
            }
            executor.Executor(sceneData, callback);
            return(executor);
        }