예제 #1
0
    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));
    }
예제 #2
0
    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();
    }
예제 #3
0
 private void Start()
 {
     foreach (var view in m_BlackjackViews)
     {
         if (view.ID.Equals(m_StartingBlackjackViewID))
         {
             m_CurrenBlackjackView = view;
             m_CurrenBlackjackView.ShowImmediate();
         }
         else
         {
             view.HideImmediate();
         }
     }
 }
예제 #4
0
 public WaitForViewComponentsToShow(BlackjackView blackjackView)
 {
     m_BlackjackView = blackjackView;
 }