예제 #1
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.");
        }
    }
예제 #2
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.");
        }
    }
예제 #3
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.");
        }
    }