Пример #1
0
    public void LoadInventory()
    {
        for (int i = 0; i < inventory.weaponId.Length; i++)
        {
            AddWeapon(itemDataBase.GetWeapon(inventory.weaponId[i]));
        }

        for (int i = 0; i < inventory.itemId.Length; i++)
        {
            AddItem(itemDataBase.GetConsumableItem(inventory.itemId[i]));
        }

        for (int i = 0; i < inventory.armorId.Length; i++)
        {
            AddArmor(itemDataBase.GetArmor(inventory.armorId[i]));
        }
    }
Пример #2
0
 public void LoadInventory()                                                // carregar items salvos no gamemanager
 {
     for (int i = 0; i < GameManager.gm.weaponId.Length; i++)               // o tamanho do vetor de weaponid
     {
         AddWeapon(itemDataBase.GetWeapons(GameManager.gm.weaponId[i]));    // acrescentar o id da weapon
     }
     for (int i = 0; i < GameManager.gm.itemId.Length; i++)                 // o tamanho do vetor de weaponid
     {
         AddItem(itemDataBase.GetConsumableitem(GameManager.gm.itemId[i])); // acrescentar o id da weapon
     }
     for (int i = 0; i < GameManager.gm.armorId.Length; i++)                // o tamanho do vetor de weaponid
     {
         AddArmor(itemDataBase.GetArmor(GameManager.gm.armorId[i]));        // acrescentar o id da weapon
     }
     for (int i = 0; i < GameManager.gm.keyId.Length; i++)                  // o tamanho do vetor de weaponid
     {
         AddKey(itemDataBase.GetKey(GameManager.gm.keyId[i]));              // acrescentar o id da weapon
     }
 }
Пример #3
0
    void LoadInventory()
    {
        for (int i = 0; i < GameManager.gm.weaponId.Length; i++)
        {
            AddWeapon(itemDataBase.GetWeapon(GameManager.gm.weaponId[i]));
        }

        for (int i = 0; i < GameManager.gm.keyId.Length; i++)
        {
            AddKey(itemDataBase.GetKey(GameManager.gm.keyId[i]));
        }

        for (int i = 0; i < GameManager.gm.itemId.Length; i++)
        {
            AddItem(itemDataBase.GetConsumableItem(GameManager.gm.itemId[i]));
        }

        for (int i = 0; i < GameManager.gm.armorId.Length; i++)
        {
            AddArmor(itemDataBase.GetArmor(GameManager.gm.armorId[i]));
        }
    }