Exemplo n.º 1
0
    public static IView Load(Transform tran, ViewScheme scheme, string path)
    {
        IView v = Load(tran, scheme);

        Debug.Log(scheme + path);
        v.Setup(path);
        return(v);
    }
Exemplo n.º 2
0
 public GridContentData(ViewScheme vs, string path, int col, int row, int w, int h)
 {
     Scheme = vs;
     View   = null;
     Path   = path;
     Column = col;
     Row    = row;
     Width  = w;
     Height = h;
 }
Exemplo n.º 3
0
 public GridContentData(ViewScheme vs, LayoutData content, int col, int row, int w, int h)
 {
     Scheme  = vs;
     View    = null;
     Path    = string.Empty;
     Content = content;
     Column  = col;
     Row     = row;
     Width   = w;
     Height  = h;
 }
Exemplo n.º 4
0
    //public static void Load(Transform tran,ViewData viewData)
    //{
    //    viewData.View = Load(tran, viewData.Scheme);
    //    viewData.View.Setup(viewData.Path);
    //}

    public static IView Load(Transform tran, ViewScheme scheme)
    {
        GameObject go = Instantiate(Resources.Load <GameObject>(scheme.ToString()), tran);

        return(go.GetComponent <IView>());
    }