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(); }
private static bool canGetShopItemByOrderForSection(Shop.Section s) { return(Shop.shopItemsByOrderBySection.ContainsKey(s)); }
public static bool IsSectionDefined(Shop.Section s) { return(canGetShopItemByOrderForSection(s) && ShopController.GetShopItemsByOrderBySection(s) != null && 0 < ShopController.GetShopItemsByOrderBySection(s).Length); }
public static ShopItem[] GetShopItemsByOrderBySection(Shop.Section s) { return(Shop.shopItemsByOrderBySection[s]); }
public void setSection(Shop.Section s) { this.s = s; }