/// <summary> /// Get the animator parameter from the 3d scene state. We might have many of these. /// </summary> /// <param name="state"></param> /// <returns></returns> private string GetAnimatorParamFromState(UIBackgroundState state) { // TODO: Fix this when we have more final animations return("Switch"); string param = ""; switch (state) { case UIBackgroundState.None: param = ""; break; default: Debug.AssertFormat(true, "{0} : The state {1} is not a valid state for an animation transition.", UIManager.Identifier, state.ToString()); break; } return(param); }
/// <summary> /// Perform a 3d Scene Camera Transition /// </summary> /// <param name="state"></param> public void Transition3dCamera(UIBackgroundState state) { if (state != UIBackgroundState.None) { if (state != mCurrent3dBackgroundState) { if (mAnimator != null) { // Set the lock. m3dAnimLock = true; mAnimator.SetTrigger(GetAnimatorParamFromState(state)); } } mCurrent3dBackgroundState = state; // Early out so m3dAnimLock will get set by the animation. return; } m3dAnimLock = false; }