SysTryCatch(NID_UI_SCENES, !IsFailed(r), r = E_SYSTEM, E_SYSTEM, "[%s] A system error has been occurred.",
GetErrorMessage(E_SYSTEM));
+ // Stop previous animation
+ if (!IsAnimationCompleted())
+ {
+ r = StopAllAnimations();
+ SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r));
+ }
+
// 2. if destoryOption == SCENE_DESTROY_OPTION_DESTROY then destroy all scenes except matching scene.
if (backwardSceneTransition.GetDestroyOption() == SCENE_DESTROY_OPTION_DESTROY)
{
SysTryCatch(NID_UI_SCENES, __currentSceneId != destinationSceneId, r = E_INVALID_ARG, E_INVALID_ARG,
"[%s] Invalid argument is used. Can't backward to current Scene.", GetErrorMessage(E_INVALID_ARG));
- // Stop previous animation
- if (!IsAnimationCompleted())
- {
- r = StopAllAnimations();
- SysTryCatch(NID_UI_SCENES, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r));
- }
-
// Transition
r = GotoScene(false, destinationSceneId, backwardSceneTransition.GetAnimationType(),
SCENE_HISTORY_OPTION_NO_HISTORY, backwardSceneTransition.GetDestroyOption(), pArgs);