Beispiel #1
0
        /// <summary>
        /// Get the flow item for the target in the specified pathOut
        /// </summary>
        /// <param name="pathOut"></param>
        /// <returns></returns>
        public SMFlowBase GetFlowTarget(SMPathOut pathOut)
        {
            if (pathOut.HasTargetID)
            {
                SMFlowBase[] list = null;
                if (!pathOut.TargetID.Contains("."))
                {
                    //list = FilterByType<SMFlowBase>();
                    list = pathOut.Owner.Parent.FilterByType <SMFlowBase>();
                }
                //Sport Transition
                else
                {
                    SMFlowBase smPathOut = U.GetComponent(pathOut.TargetID) as SMFlowBase;
                    return(smPathOut);
                }


                if (list.Length > 0)
                {
                    try
                    {
                        return(list.First(c => c.Name == pathOut.TargetID));
                    }
                    catch
                    {
                        pathOut.DeletedTarget();
                    }
                }
            }
            return(null);
        }