Ejemplo n.º 1
0
 private void loadUI()
 {
     GlobalFunction.DestroyAllChild(gridTheme.transform);
     for (int i = 0; i < Constants.itemThemes.Length; i++)
     {
         GameObject    go     = GlobalFunction.AddChild(gridTheme.gameObject, prefab);
         ItemThemeCell script = go.GetComponent <ItemThemeCell>();
         script.SetData(Constants.itemThemes[i]);
         script.callback = onCallClicked;
     }
 }
Ejemplo n.º 2
0
 private void loadUI()
 {
     GlobalFunction.DestroyAllChild(gridSprite.transform);
     for (int i = 0; i < list.Length; i++)
     {
         GameObject  go     = GlobalFunction.AddChild(gridSprite.gameObject, prefab);
         ItemPicCell script = go.GetComponent <ItemPicCell>();
         script.SetData(list[i]);
         script.callback = callOpenScene;
     }
 }