public void UpdateObservers(IShopMode mode) { if (mode.GetType() == typeof(HatShopMode)) { currentmode = hatShopMode; } if (mode.GetType() == typeof(BodyShopMode)) { currentmode = bodyShopMode; } items1 = currentmode.GetItems(); itemsObjects = new GameObject[items1.Length]; for (int i = 0; i < items1.Length; i++) { itemsObjects[i] = items1[i].GetObject(); } DeleteScrollList(); DrawScrollList(); SpawnItemsOnScroll(); }
public void UpdateObservers(IShopMode mode) { shopMode = mode; currentModeItems = shopMode.GetItems(); lastItemId = 999; }