/// <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.CallDestroy(); previousScene = null; } transition = null; CurrentScene.CallTransitionFinished(); } } else { if(nextScene != null) { if(CurrentScene != null) { CurrentScene.CallChanging(); CurrentScene.CallDestroy(); } CurrentScene = nextScene; core.ChangeScene(nextScene.CoreScene); nextScene.Start(); nextScene = null; } } return mes; }
/// <summary> /// 終了処理を行う。 /// </summary> public static void Terminate() { if(core == null) return; if(CurrentScene != null) { CurrentScene.CallDestroy(); } if(nextScene != null) { nextScene.CallDestroy(); } if(previousScene != null) { previousScene.CallDestroy(); } CurrentScene = null; nextScene = null; previousScene = null; transition = null; GC.Terminate(); core.Terminate(); core.Release(); core = null; Mouse = null; var refCount = swig.asd_core.GetGlobalReferenceCount__(); if(refCount > 0) { Particular.Helper.ThrowUnreleasedInstanceException(refCount); } }
/// <summary> /// 描画する対象となるシーンを画面遷移効果ありで変更する。 /// </summary> /// <param name="scene">次のシーン</param> /// <param name="transition">画面遷移効果</param> public static void ChangeSceneWithTransition(Scene scene, Transition transition) { nextScene = scene; Engine.transition = transition; }