/// <summary> /// 更新処理を行う。 /// </summary> public static void Update() { if (core == null) { return; } core.BeginDrawing(); layerProfiler.Refresh(); if (CurrentScene != null && CurrentScene.IsAlive) { CurrentScene.Update(); foreach (var item in CurrentScene.Layers) { layerProfiler.Record(item.Name, item.ObjectCount, item.TimeForUpdate); } } CommitChanges(); if (CurrentScene != null) { CurrentScene.Draw(); } transitionState.Update(); transitionState.Draw(); core.Draw(); core.EndDrawing(); }
/// <summary> /// 更新処理を行う。 /// </summary> public static void Update() { if (core == null) { return; } core.BeginDrawing(); layerProfiler.Refresh(); if (CurrentScene != null) { CurrentScene.Update(); foreach (var item in CurrentScene.Layers) { layerProfiler.Record(item.Name, item.ObjectCount, item.TimeForUpdate); } } if (transition != null) { transition.OnUpdate(); } if (CurrentScene != null) { CurrentScene.Draw(); } if (transition != null) { swig.CoreScene prevScene = null; swig.CoreScene curScene = null; if (CurrentScene != null) { curScene = CurrentScene.CoreScene; } if (previousScene != null) { prevScene = previousScene.CoreScene; } if (transition.SwigObject.GetIsSceneChanged()) { core.DrawSceneToWindowWithTransition(curScene, prevScene, transition.SwigObject); } else { core.DrawSceneToWindowWithTransition(null, curScene, transition.SwigObject); } } else { if (CurrentScene != null) { core.DrawSceneToWindow(CurrentScene.CoreScene); } } core.Draw(); core.EndDrawing(); }