// When show animation is finished the animation component un-subscribes from the canvas event. public void OnElementShowAnimationFinished(IBaseCanvasStateListner _tempListener) { m_showAnimationListeners.Remove(_tempListener); if (m_showAnimationListeners.Count <= 0) { OnScreenLoaded(); } }
// When show animation is called the animation component subscribes to the canvas event. public void OnElementShowAnimationStarted(IBaseCanvasStateListner _tempListener) { m_showAnimationListeners.Add(_tempListener); if (!m_activeAnimationListeners.Contains(_tempListener)) { m_activeAnimationListeners.Add(_tempListener); } }
// When Hide animation is finished the animation component un-subscribes from the canvas event. public void OnElementHideAnimationFinished(IBaseCanvasStateListner _tempListener) { m_hideAnimationListeners.Remove(_tempListener); m_activeAnimationListeners.Remove(_tempListener); if (m_hideAnimationListeners.Count <= 0) { OnScreenHidden(); } if (m_activeAnimationListeners.Count <= 0) { EnableDisableCanvas(false); } }
// When Hide animation is called the animation component subscribes to the canvas event. public void OnElementHideAnimationStarted(IBaseCanvasStateListner _tempListener) { m_hideAnimationListeners.Add(_tempListener); }