public void SetShopMode(int i) { if (i == 1 && mode != 1) { mode = 1; currentShopmode = hatShopMode; MeasuremetsChanged(); } if (i == 2 && mode != 2) { mode = 2; currentShopmode = bodyShopMode; MeasuremetsChanged(); } }
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(); }
private void Start() { _shop = GetComponent <Shop>(); InitializeShop(); shopMode = new PlaneMode(); }
public void SetShopMode(IShopMode mode) { shopMode = mode; }
public void UpdateObservers(IShopMode mode) { shopMode = mode; currentModeItems = shopMode.GetItems(); lastItemId = 999; }