Example #1
0
        private ExampleProject.UI.Loader.Loading.LoadingScreen INTERNAL_FlowFunctionLoader(bool hide, bool hideWait, System.Action <FlowFunctionLoaderRoutes> onFunctionEnds, System.Action <ExampleProject.UI.Loader.Loading.LoadingScreen> onParametersPassCall = null)
        {
            ExampleProject.UI.Loader.Loading.LoadingScreen newWindow = default(ExampleProject.UI.Loader.Loading.LoadingScreen);
            var item = UnityEngine.UI.Windows.Plugins.Flow.FlowSystem.GetAttachItem(43, 39);

            if (hide == true && hideWait == true)
            {
                this.Hide(() => {
                    if (onFunctionEnds != null)
                    {
                        newWindow = WindowSystem.Show <ExampleProject.UI.Loader.Loading.LoadingScreen>(
                            (w) => WindowSystem.RegisterFunctionCallback(w, (index) => onFunctionEnds(new FlowFunctionLoaderRoutes(w, index))),
                            item,
                            onParametersPassCall
                            );
                    }
                    else
                    {
                        newWindow = WindowSystem.Show <ExampleProject.UI.Loader.Loading.LoadingScreen>(
                            null,
                            item,
                            onParametersPassCall
                            );
                    }

                    WindowSystemFlow.OnDoTransition(item.index, 43, 39, hide);
                }, item);
            }
            else
            {
                if (onFunctionEnds != null)
                {
                    newWindow = WindowSystem.Show <ExampleProject.UI.Loader.Loading.LoadingScreen>(
                        (w) => WindowSystem.RegisterFunctionCallback(w, (index) => onFunctionEnds(new FlowFunctionLoaderRoutes(w, index))),
                        item,
                        onParametersPassCall
                        );
                }
                else
                {
                    newWindow = WindowSystem.Show <ExampleProject.UI.Loader.Loading.LoadingScreen>(
                        null,
                        item,
                        onParametersPassCall
                        );
                }

                WindowSystemFlow.OnDoTransition(item.index, 43, 39, hide);

                if (hide == true)
                {
                    this.Hide(item);
                }
            }

            return(newWindow);
        }
        /// <summary>
        /// Call the Function Loader.
        /// Use this method to play transition effect on B window only.
        /// If you call Hide() on A window - it will hide with standard behaviour.
        /// Function: Loading
        /// </summary>
        /// <returns>Function root window</returns>
        public virtual ExampleProject.UI.Loader.Loading.LoadingScreen FlowFunctionLoader(UnityEngine.Events.UnityAction <FlowFunctionLoaderRoutes> onFunctionEnds, params object[] parameters)
        {
            ExampleProject.UI.Loader.Loading.LoadingScreen instance = null;
            var item = UnityEngine.UI.Windows.Plugins.Flow.FlowSystem.GetAttachItem(28, 40);

            if (item == null || item.transition == null)
            {
                instance = WindowSystem.Show <ExampleProject.UI.Loader.Loading.LoadingScreen>((window) => {
                    WindowSystem.RegisterFunctionCallback(window, (index) => { onFunctionEnds(new FlowFunctionLoaderRoutes(this, index)); });
                }, parameters);
            }
            else
            {
                instance = WindowSystem.Show <ExampleProject.UI.Loader.Loading.LoadingScreen>((window) => {
                    WindowSystem.RegisterFunctionCallback(window, (index) => { onFunctionEnds(new FlowFunctionLoaderRoutes(this, index)); });
                }, item.transition, item.transitionParameters, parameters);
            }

            return(instance);
        }