protected virtual void GoToView(string blackjackViewID, OnViewTransitionComplete onViewTransitionComplete = null) { BlackjackView targetBlackjackView = FindBlackjackView(blackjackViewID); if (m_CurrenBlackjackView == null) { m_CurrenBlackjackView = targetBlackjackView; return; } StartCoroutine(GoToViewCoroutineImpl(m_CurrenBlackjackView, targetBlackjackView, onViewTransitionComplete)); }
protected virtual IEnumerator GoToViewCoroutineImpl(BlackjackView currentView, BlackjackView targetView, OnViewTransitionComplete onViewTransitionComplete) { currentView.Hide((obj) => { }); // TO-DO: Make transition to new blackjack view yield return(new WaitForSeconds(0.5f)); m_CurrenBlackjackView = targetView; m_CurrenBlackjackView.Show((obj) => { }); onViewTransitionComplete?.Invoke(); }
private void Start() { foreach (var view in m_BlackjackViews) { if (view.ID.Equals(m_StartingBlackjackViewID)) { m_CurrenBlackjackView = view; m_CurrenBlackjackView.ShowImmediate(); } else { view.HideImmediate(); } } }
public WaitForViewComponentsToShow(BlackjackView blackjackView) { m_BlackjackView = blackjackView; }