void OnEnable() { Instance = this; StartCoroutine(InitShopDataCoroutine()); SceneLobby.Instance.OnChangedMenu += OnChangedMenu; UIShopProductSlot.onClickItemButtonCallback += UpdateMoneyDataByShop; UIPackageSlot.onClickItemButtonCallback += UpdateMoneyDataByShop; }
public ShopData ChechDataOnLoad(ShopDataController shopScriptable) { //ilk defa çalıştırılırsa aşağıdaki if bloğu çalışır. if (firstCreate) { data = new List <string>(); Debug.Log("Data Boyut: " + shopScriptable.length); for (int i = 0; i < shopScriptable.length; i++) { shopScriptable.shopProducts[i].shopValues.id = i; AddData(shopScriptable.shopProducts[i].shopValues); } SaveData(); } return(this); }
public void Initialize() { dataController = GetComponent <ShopDataController>(); displayController = GetComponent <ShopDisplayController>(); StartShop(); }
void ShopListCreate(ShopDataController shopDataController) { //ShowShop(ShopType.Hero); }