Пример #1
0
        public static string SetUp(UINavRepository r, NavigationComponent panel)
        {
            List <NavStateBuildNode> graphNodes = new List <NavStateBuildNode>();

            SetUpP(r, out NavStartBuildNode start, out NavNestedEndBuildNode end, graphNodes);

            //if (start.next is NavStateBuildNode t)
            //{
            //    Debug.Log("Debuging Graph:" + t.DebugGraph());
            //}

            foreach (var graphNode in graphNodes)
            {
                graphNode.TransformToActivity(panel);
            }

            if (r != null)
            {
                panel.DefaultInAnimation     = r.DefaultInAnimation;
                panel.DefaultOutAnimation    = r.DefaultOutAnimation;
                panel.DefaultInputController = r.DefaultInputController;
            }

            if (start.next is NavStateBuildNode navStartBuildNode)
            {
                return(navStartBuildNode.data.PanelName);
            }
            return("");
        }
Пример #2
0
        internal void TransformToActivity(NavigationComponent applicationComponent)
        {
            if (applicationComponent.TryGetActivity(data.PanelName, out Activity activity))
            {
                activity.InputController = data.InputController;
                activity.InAnimation     = data.InAnimation;
                activity.OutAnimation    = data.OutAnimation;
                activity.DoNotHide       = data.DoNotHide;

                Dictionary <string, string> nextActivities = new Dictionary <string, string>();
                foreach (var n in next)
                {
                    if (n.Value is NavStateBuildNode navStateBuildNode)
                    {
                        nextActivities.Add(n.Key, navStateBuildNode.data.PanelName);
                    }
                }
                activity.SetNavData(nextActivities);
            }
            else
            {
                Debug.Log("Activity " + data.PanelName + " was not found");
            }
        }