public void Options(int id) { inventory.addItem(currentChosenItem); for (int i = 0; i < StoreItems.Count; i++) { if (StoreItems[i].ID == id) { player.Money -= StoreItems[i].Cost; } } ExitCancelChoice(); }
// button options public void ChooseToCraft() { inventory.addItem(currentChosenItem); for (int i = 0; i < itemsToRemove.Count; i++) { inventory.RemoveItem(itemsToRemove[i]); } itemsToRemove.Clear(); CraftOptions.gameObject.SetActive(false); CraftUnable.gameObject.SetActive(false); }
void EndDialogue() { if (itemGiven != 0) { string giveItemText = " [Player] receaved " + item.ItemsList[itemGiven].Name; inventory.addItem(itemGiven); StartCoroutine(TypeSentence(giveItemText)); itemGiven = 0; } else if (isbattle == true) { isbattle = false; battle.StartBattle(clas.enamies[MonsterNumber], move); EndDialogue(); } else if (isAStore == true) { isAStore = false; Debug.Log("Price" + PriceRange); store.MakeStore(PriceRange); EndDialogue(); } else if (IsCrafter == true) { IsCrafter = false; craftStore.MakeCraftStore(); EndDialogue(); } else { move.canMove = true; NpcTalking = false; anim.SetBool("TalkBoxOpen", false); } }