예제 #1
0
        /// <summary>
        /// イベントを実行し、進行可否を判断する。
        /// </summary>
        /// <returns>進行可能か?</returns>
        public static bool DoEvents()
        {
            if (core == null)
            {
                return(false);
            }

            GC.Update();

            bool mes = core.DoEvents();

            if (Mouse != null)
            {
                Mouse.RefreshAllState();
            }

            transitionState.Proceed();

            return(mes);
        }
예제 #2
0
파일: Engine.cs 프로젝트: neofuji/Altseed
        /// <summary>
        /// イベントを実行し、進行可否を判断する。
        /// </summary>
        /// <returns>進行可能か?</returns>
        public static bool DoEvents()
        {
            if (core == null)
            {
                return(false);
            }

            GC.Update();

            bool mes = core.DoEvents();

            if (Mouse != null)
            {
                Mouse.RefreshAllState();
            }

            if (transition != null)
            {
                if (transition.SwigObject.GetIsSceneChanged() && nextScene != null)
                {
                    if (CurrentScene != null)
                    {
                        CurrentScene.CallChanging();
                    }
                    previousScene = CurrentScene;
                    CurrentScene  = nextScene;
                    core.ChangeScene(nextScene.CoreScene);
                    nextScene.Start();
                    nextScene = null;
                }

                if (transition.SwigObject.GetIsFinished())
                {
                    if (previousScene != null)
                    {
                        previousScene.Dispose();
                        previousScene = null;
                    }

                    transition = null;
                    CurrentScene.CallTransitionFinished();
                }
            }
            else
            {
                if (nextScene != null)
                {
                    if (CurrentScene != null)
                    {
                        CurrentScene.CallChanging();
                        CurrentScene.Dispose();
                    }

                    CurrentScene = nextScene;
                    core.ChangeScene(nextScene.CoreScene);
                    nextScene.Start();
                    nextScene = null;
                }
            }

            return(mes);
        }