void Start()
    {
        // getting the parent which is the ShopItemScrollViewContentViewTemplate
        GameObject parentScrollView = transform.parent.parent.parent.gameObject;

        // Accessing the shop.section of the current instance which is set in ShopSectionScrollViewContentView.cs before.
        // Since the Section must be instantiated for the content object to be instantiated, therefore the start() of this script will
        // never run before the ShopSectionScrollViewContentView.cs start().
        section = parentScrollView.GetComponent <ShopSectionScrollViewCell>().getSection();
        Populate();
    }
예제 #2
0
 private static bool canGetShopItemByOrderForSection(Shop.Section s)
 {
     return(Shop.shopItemsByOrderBySection.ContainsKey(s));
 }
예제 #3
0
 public static bool IsSectionDefined(Shop.Section s)
 {
     return(canGetShopItemByOrderForSection(s) && ShopController.GetShopItemsByOrderBySection(s) != null && 0 < ShopController.GetShopItemsByOrderBySection(s).Length);
 }
예제 #4
0
 public static ShopItem[] GetShopItemsByOrderBySection(Shop.Section s)
 {
     return(Shop.shopItemsByOrderBySection[s]);
 }
 public void setSection(Shop.Section s)
 {
     this.s = s;
 }