// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.E) && isActice) { if (isBomb) { if (inventar.slizeCount >= 5) { inventar.boombCount++; inventar.slizeCount -= 5; } } else if (isShilt) { if (inventar.slizeCount >= 5) { inventar.shiltCount++; inventar.slizeCount -= 5; } } else if (isFrize) { if (inventar.slizeCount >= 30) { player.isFrize = true; inventar.slizeCount -= 30; this.gameObject.SetActive(false); Destroy(go); mianMenu.CloseShopMessage(); } } else if (isLifeStill) { if (inventar.slizeCount >= 50) { player.isLifeStill = true; inventar.slizeCount -= 50; this.gameObject.SetActive(false); Destroy(go); mianMenu.CloseShopMessage(); } } } }