Exemple #1
0
 public virtual void Show(Context context)
 {
     if (FindTarget() is PageContainer pc)
     {
         pc.LoadPage(name, context);
     }
     else
     {
         PageContainer.Load <Page>(name, context);
     }
 }
Exemple #2
0
        public static T Load <T>(string name, Context context = null) where T : Page
        {
            PageContainer c = FindObjectOfType <PageContainer>();

            if (c != null)
            {
                T page = c.LoadPage <T>(name, context);
                if (page != null)
                {
                    page.gameObject.SetActive(true);
                }
                return(page);
            }
            return(null);
        }
Exemple #3
0
 internal void SetContainer(PageContainer owner)
 {
     this.owner = owner;
 }