Esempio n. 1
0
        public static Witchcraft ExecuteAsync(System.Func <Magic> func, CallbackType callbackType)
        {
            var witchcraft = new Witchcraft();

            witchcraft.exec         = func;
            witchcraft.async        = true;
            witchcraft.callbackType = callbackType;
            WitchcraftBehaviour.GetInstance().witchcrafts.Add(witchcraft);
            return(witchcraft);
        }
Esempio n. 2
0
        static void Loaded(AsyncOperation async)
        {
            loading = false;
            var page = GetCurrentPage();

            page.AfterInitialize();
            if (page.IsTransitionWait)
            {
                Witchcraft.ExecuteCoroutine(TransitionWait(page));
            }
            else
            {
                var lastScene = SceneManager.GetSceneAt(SceneManager.sceneCount - 2);
                SceneManager.UnloadSceneAsync(lastScene);
            }
        }