예제 #1
0
    IEnumerator TransitionToCo(UIPage.PageType _eTo)
    {
        overlay.transform.SetAsLastSibling();
        overlay.SetActive(true);
        if (currentPage != null)
        {
            currentPage.OnExit();
        }
        yield return(new WaitForSeconds(0.75f));

        GameObject _obj          = Resources.Load <GameObject>("Screen/" + _eTo.ToString());
        GameObject _loadedObject = Instantiate(_obj, this.transform);

        currentPage = _loadedObject.GetComponent <UIPage>();
        currentPage.OnEnter();
    }
예제 #2
0
 public void TransitionTo(UIPage.PageType _eTo)
 {
     StartCoroutine(TransitionToCo(_eTo));
 }