Example #1
0
 public void AddEventShopList(JSON_ShopListArray.Shops[] shops)
 {
     for (int index = 0; index < shops.Length; ++index)
     {
         GameObject        gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ItemTemplate);
         EventShopListItem component  = (EventShopListItem)gameObject.GetComponent <EventShopListItem>();
         component.SetShopList(shops[index]);
         gameObject.get_transform().SetParent(((Component)this).get_transform());
         gameObject.get_transform().set_localScale(this.ItemTemplate.get_transform().get_localScale());
         ((ListItemEvents)gameObject.GetComponent <ListItemEvents>()).OnSelect = new ListItemEvents.ListItemEvent(this.OnSelectItem);
         gameObject.SetActive(true);
         GlobalVars.EventShopListItems.Add(component);
     }
 }
Example #2
0
 public void AddEventShopList(JSON_ShopListArray.Shops[] shops)
 {
     for (int index = 0; index < shops.Length; ++index)
     {
         Json_ShopMsgResponse msg = EventShopList.ParseMsg(shops[index]);
         if (msg != null && msg.hide == 0)
         {
             GameObject        gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.ItemTemplate);
             EventShopListItem component  = (EventShopListItem)gameObject.GetComponent <EventShopListItem>();
             component.SetShopList(shops[index], msg);
             gameObject.get_transform().SetParent(((Component)this).get_transform());
             gameObject.get_transform().set_localScale(this.ItemTemplate.get_transform().get_localScale());
             ((ListItemEvents)gameObject.GetComponent <ListItemEvents>()).OnSelect = new ListItemEvents.ListItemEvent(this.OnSelectItem);
             gameObject.SetActive(true);
             GlobalVars.EventShopListItems.Add(component);
         }
     }
 }