Пример #1
0
    public void BuyButton()
    {
        totalMoney.value -= recipePrice;
        BuyAvailable();
        ItemEntry item = itemGenerator.GenerateLevel(playerLevel.value);

        invHandler.AddBag(item);
    }
Пример #2
0
    /// <summary>
    /// Adds the module to the inventory.
    /// </summary>
    /// <param name="module"></param>
    /// <param name="equip"></param>
    void AddModule(Module module, bool equip)
    {
        bool added;

        if (equip)
        {
            added = invModuleHandler.AddEquip(module);
        }
        else
        {
            added = invModuleHandler.AddBag(module);
        }
        if (added)
        {
            inventoryChanged.Invoke();
        }
        else
        {
            Debug.Log("No room left to add module.");
        }
    }
Пример #3
0
    /// <summary>
    /// Adds the kanji to the inventory.
    /// </summary>
    /// <param name="kanji"></param>
    /// <param name="equip"></param>
    void AddKanji(Kanji kanji, bool equip)
    {
        bool added;

        if (equip)
        {
            added = invKanjiHandler.AddEquip(kanji);
        }
        else
        {
            added = invKanjiHandler.AddBag(kanji);
        }
        if (added)
        {
            inventoryChanged.Invoke();
        }
        else
        {
            Debug.Log("No room left to add kanji.");
        }
    }
Пример #4
0
    /// <summary>
    /// Adds the item to inventory.
    /// </summary>
    /// <param name="item"></param>
    /// <param name="equip"></param>
    void AddItem(ItemEquip item, bool equip)
    {
        bool added;

        Debug.Log("I'm Adding an item!");
        if (equip)
        {
            added = invItemHandler.AddEquip(item);
        }
        else
        {
            added = invItemHandler.AddBag(item);
        }
        if (added)
        {
            inventoryChanged.Invoke();
        }
        else
        {
            Debug.Log("No room left to add item.");
        }
    }